diff options
Diffstat (limited to 'zte/vmanager/driver/pub/utils/restcall.py')
-rw-r--r-- | zte/vmanager/driver/pub/utils/restcall.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zte/vmanager/driver/pub/utils/restcall.py b/zte/vmanager/driver/pub/utils/restcall.py index fd0b3ddd..6b2c4b05 100644 --- a/zte/vmanager/driver/pub/utils/restcall.py +++ b/zte/vmanager/driver/pub/utils/restcall.py @@ -15,7 +15,7 @@ import logging import sys import traceback -import urllib2 +import urllib.error import uuid import httplib2 @@ -61,7 +61,7 @@ def call_req(base_url, user, passwd, auth_type, resource, method, content=''): 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()) |