From c5a004d7c2f1bdd4738aeb3617e994b790d21dbf Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 11 Apr 2018 22:41:01 +0800 Subject: [PATCH] pybind/mgr/dashboard: silence lint warnings this silences following errors: 9: ./awsauth.py:42:1: E722 do not use bare except' 9: ./awsauth.py:116:13: E722 do not use bare except' Signed-off-by: Kefu Chai --- src/pybind/mgr/dashboard/awsauth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/dashboard/awsauth.py b/src/pybind/mgr/dashboard/awsauth.py index 123d6282519b9..3fafcd75f4d12 100644 --- a/src/pybind/mgr/dashboard/awsauth.py +++ b/src/pybind/mgr/dashboard/awsauth.py @@ -39,7 +39,7 @@ py3k = False try: from urlparse import urlparse, unquote from base64 import encodestring -except: +except ImportError: py3k = True from urllib.parse import urlparse, unquote from base64 import encodebytes as encodestring @@ -113,7 +113,7 @@ class S3Auth(AuthBase): lk = key.lower() try: lk = lk.decode('utf-8') - except: + except UnicodeDecodeError: pass if headers[key] and (lk in interesting_headers.keys() or lk.startswith('x-amz-')): -- 2.39.5