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 <kchai@redhat.com>
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
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-')):