summaryrefslogtreecommitdiffstats
path: root/azure/multicloud_azure
diff options
context:
space:
mode:
Diffstat (limited to 'azure/multicloud_azure')
-rw-r--r--azure/multicloud_azure/pub/utils/fileutil.py2
-rw-r--r--azure/multicloud_azure/pub/utils/restcall.py2
-rw-r--r--azure/multicloud_azure/swagger/views/flavor/views.py2
-rw-r--r--azure/multicloud_azure/tests/test_pub_utils.py2
4 files changed, 4 insertions, 4 deletions
diff --git a/azure/multicloud_azure/pub/utils/fileutil.py b/azure/multicloud_azure/pub/utils/fileutil.py
index 1868300..8449322 100644
--- a/azure/multicloud_azure/pub/utils/fileutil.py
+++ b/azure/multicloud_azure/pub/utils/fileutil.py
@@ -20,7 +20,7 @@ logger = logging.getLogger(__name__)
def make_dirs(path):
if not os.path.exists(path):
- os.makedirs(path, 0777)
+ os.makedirs(path, 0o777)
def delete_dirs(path):
diff --git a/azure/multicloud_azure/pub/utils/restcall.py b/azure/multicloud_azure/pub/utils/restcall.py
index 0b0ef33..81f4139 100644
--- a/azure/multicloud_azure/pub/utils/restcall.py
+++ b/azure/multicloud_azure/pub/utils/restcall.py
@@ -86,7 +86,7 @@ def call_req(base_url, user, passwd, auth_type, resource, method, content='',
raise ex
except urllib2.URLError as err:
ret = [2, str(err), resp_status, resp]
- except Exception as ex:
+ except Exception:
logger.error(traceback.format_exc())
logger.error("[%s]ret=%s" % (callid, str(sys.exc_info())))
res_info = str(sys.exc_info())
diff --git a/azure/multicloud_azure/swagger/views/flavor/views.py b/azure/multicloud_azure/swagger/views/flavor/views.py
index c4eb060..8b65cea 100644
--- a/azure/multicloud_azure/swagger/views/flavor/views.py
+++ b/azure/multicloud_azure/swagger/views/flavor/views.py
@@ -27,7 +27,7 @@ class FlavorsView(APIView):
def post(self, request, vimid):
try:
create_req = json.loads(request.body)
- except Exception as e:
+ except Exception:
return Response(data={'error': 'Fail to decode request body.'},
status=status.HTTP_500_INTERNAL_SERVER_ERROR)
diff --git a/azure/multicloud_azure/tests/test_pub_utils.py b/azure/multicloud_azure/tests/test_pub_utils.py
index 1e08e9b..784013b 100644
--- a/azure/multicloud_azure/tests/test_pub_utils.py
+++ b/azure/multicloud_azure/tests/test_pub_utils.py
@@ -46,7 +46,7 @@ class TestPub(unittest.TestCase):
def test_make_dirs(self):
path = "/tmp/azure/azure/bin"
- self.assertEqual(os.makedirs(path, 0777), make_dirs(path))
+ self.assertEqual(os.makedirs(path, 0o777), make_dirs(path))
def test_delete_dirs(self):
path = "/tmp/azure/azure/bin"