From: Ricardo Dias Date: Fri, 27 Apr 2018 11:38:41 +0000 (+0100) Subject: mgr/dashboard: awsauth: fix python3 string decode problem X-Git-Tag: v14.0.0~197^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F21794%2Fhead;p=ceph.git mgr/dashboard: awsauth: fix python3 string decode problem Signed-off-by: Ricardo Dias --- diff --git a/src/pybind/mgr/dashboard/awsauth.py b/src/pybind/mgr/dashboard/awsauth.py index 3fafcd75f4d12..fdf87de61377d 100644 --- a/src/pybind/mgr/dashboard/awsauth.py +++ b/src/pybind/mgr/dashboard/awsauth.py @@ -112,7 +112,8 @@ class S3Auth(AuthBase): for key in headers: lk = key.lower() try: - lk = lk.decode('utf-8') + if isinstance(lk, bytes): + lk = lk.decode('utf-8') except UnicodeDecodeError: pass if headers[key] and (lk in interesting_headers.keys()