summaryrefslogtreecommitdiff
path: root/heatclient
diff options
context:
space:
mode:
authorliyi <liyi8611@gmail.com>2018-02-01 14:56:03 +0800
committerliyi <liyi8611@gmail.com>2018-02-01 14:56:03 +0800
commit6a27997abb1944f19feedf52b9f1415c15157861 (patch)
tree26d1fe017ef33e793a8b9fa411f01fb565e07586 /heatclient
parent2ce6aa19a3a8936bc7c9737efadacbb4ae737dab (diff)
downloadpython-heatclient-6a27997abb1944f19feedf52b9f1415c15157861.tar.gz
Fix log_http_request function in http module
Change-Id: I043f90541c8d2d604f3edb4e7ea082ec8adb4b25 Closes-Bug: #1746669
Diffstat (limited to 'heatclient')
-rw-r--r--heatclient/common/http.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/heatclient/common/http.py b/heatclient/common/http.py
index 4b765df..bb2f0c1 100644
--- a/heatclient/common/http.py
+++ b/heatclient/common/http.py
@@ -137,7 +137,10 @@ class HTTPClient(object):
if 'data' in kwargs:
curl.append('-d \'%s\'' % kwargs['data'])
- curl.append('%s%s' % (self.endpoint, url))
+ if not parse.urlparse(url).netloc:
+ url = self.endpoint + url
+
+ curl.append(url)
LOG.debug(' '.join(curl))
@staticmethod