Merge pull request #21794 from rjfd/wip-dashboard-fix-awsauth

mgr/dashboard: awsauth: fix python3 string decode problem

Reviewed-by: Sebastian Wagner <swagner@suse.com>
Reviewed-by: Lenz Grimmer <LGrimmer@suse.com>
This commit is contained in:
Volker Theile 2018-05-07 17:28:46 +02:00 committed by GitHub
commit fbf4c8dcbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()