Skip to content

Commit

Permalink
Remove excessively broad try/except scope
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Kirkham committed Jan 16, 2021
1 parent ea23eda commit de47c00
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions wagtail_transfer/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,4 @@ def digest_for_source(source, message):
return hmac.new(key, message, hashlib.sha1).hexdigest()

def requests_auth(source):
try:
return settings.WAGTAILTRANSFER_SOURCES[source]['BASIC_AUTH']
except:
return None
return settings.WAGTAILTRANSFER_SOURCES[source].get('BASIC_AUTH', None)

0 comments on commit de47c00

Please sign in to comment.