diff options
Diffstat (limited to 'mgr')
-rw-r--r-- | mgr/mgr/pub/utils/restcall.py | 4 | ||||
-rw-r--r-- | mgr/mgr/samples/views.py | 2 | ||||
-rw-r--r-- | mgr/mgr/swagger/management/commands/export_swagger.py | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/mgr/mgr/pub/utils/restcall.py b/mgr/mgr/pub/utils/restcall.py index e37156d..8f29675 100644 --- a/mgr/mgr/pub/utils/restcall.py +++ b/mgr/mgr/pub/utils/restcall.py @@ -16,7 +16,9 @@ import base64 import sys import traceback import logging -import urllib +import urllib.request +import urllib.parse +import urllib.error import uuid import httplib2 diff --git a/mgr/mgr/samples/views.py b/mgr/mgr/samples/views.py index 5a56260..ef71984 100644 --- a/mgr/mgr/samples/views.py +++ b/mgr/mgr/samples/views.py @@ -79,7 +79,7 @@ def stub(request, *args, **kwargs): re_match = uri_re.match(request.path) if not re_match: continue - for k, v in re_match.groupdict().items(): + for k, v in list(re_match.groupdict().items()): data = data.replace('<%s>' % k, v) return Response(data=json.loads(data), status=code) return Response(data={"stub": "stub"}, status=status.HTTP_200_OK) diff --git a/mgr/mgr/swagger/management/commands/export_swagger.py b/mgr/mgr/swagger/management/commands/export_swagger.py index e510189..63371f7 100644 --- a/mgr/mgr/swagger/management/commands/export_swagger.py +++ b/mgr/mgr/swagger/management/commands/export_swagger.py @@ -33,4 +33,4 @@ class Command(BaseCommand): response = self.client.get("/api/vnfmgr/v1/swagger.json") with open(options['name'], 'w') as swagger_file: swagger_file.write(json.dumps(response.data)) - print("swagger api is written to %s" % options['name']) + print(("swagger api is written to %s" % options['name'])) |