diff options
author | hongyuzhao <zhao.hongyu@zte.com.cn> | 2019-06-28 09:51:33 +0800 |
---|---|---|
committer | hongyuzhao <zhao.hongyu@zte.com.cn> | 2019-07-03 11:19:09 +0800 |
commit | 46ad7c172411214c5432ed93fda4271288077447 (patch) | |
tree | 74adb32f9cdfe575184e67068faac9bc6c2117b7 /lcm/lcm/pub/utils/restcall.py | |
parent | 37b1ae2386c365293249421595f0722c25bc8e8d (diff) |
vfclcm upgrade from python2 to python3
Change-Id: Ia55ae38ec64fc3d821d1e7e1c0cbe48b572a0dd4
Issue-ID: VFC-1429
Signed-off-by: hongyuzhao <zhao.hongyu@zte.com.cn>
Diffstat (limited to 'lcm/lcm/pub/utils/restcall.py')
-rw-r--r-- | lcm/lcm/pub/utils/restcall.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lcm/lcm/pub/utils/restcall.py b/lcm/lcm/pub/utils/restcall.py index 6bcb0331..37ff668a 100644 --- a/lcm/lcm/pub/utils/restcall.py +++ b/lcm/lcm/pub/utils/restcall.py @@ -15,7 +15,7 @@ import sys import traceback import logging -import urllib2 +import urllib.error import uuid import httplib2 @@ -62,7 +62,7 @@ def call_req(base_url, user, passwd, auth_type, resource, method, content='', ad ret = [1, "Unable to connect to %s" % full_url, resp_status] continue raise ex - except urllib2.URLError as err: + except urllib.error.URLError as err: ret = [2, str(err), resp_status] except Exception as ex: logger.error(traceback.format_exc()) |