aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormaopengzhang <zhang.maopeng1@zte.com.cn>2019-07-16 16:00:16 +0800
committermaopengzhang <zhang.maopeng1@zte.com.cn>2019-07-16 16:00:16 +0800
commita09c45912fb2413e8f8fb0ae296a585ff11d8744 (patch)
tree9eade39ed650ad77fa3208eecc478d014888673c
parente21d3e267140135cc7124a7cfce336e55a2d44b9 (diff)
resolve python2->python3 issues
change base64 code Change-Id: I79b87ea28dc4c1f4172e83fdd2a194c5bf978c89 Issue-ID: VFC-1429 Signed-off-by: maopengzhang <zhang.maopeng1@zte.com.cn>
-rw-r--r--lcm/pub/utils/restcall.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lcm/pub/utils/restcall.py b/lcm/pub/utils/restcall.py
index d59513ef..9fd81601 100644
--- a/lcm/pub/utils/restcall.py
+++ b/lcm/pub/utils/restcall.py
@@ -44,7 +44,7 @@ def call_req(base_url, user, passwd, auth_type, resource, method, content='', ad
full_url = combine_url(base_url, resource)
headers = {'content-type': 'application/json', 'accept': 'application/json'}
if user:
- headers['Authorization'] = 'Basic %s' % base64.b64encode(bytes('%s:%s' % (user, passwd), "utf-8"))
+ headers['Authorization'] = 'Basic %s' % base64.b64encode(bytes('%s:%s' % (user, passwd), "utf-8")).decode()
ca_certs = None
if additional_headers:
headers.update(additional_headers)