mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-06 09:57:57 +00:00
Stop using bare exceptions
This is frowned upon in newer versions of pep8, so fix it once and for all.
This commit is contained in:
@ -189,7 +189,7 @@ def validate_sshkey(key):
|
||||
raise ValidationError("Only keys of types {0} are supported, not {1}.".format(", ".join(_valid_keytypes), pieces[0]))
|
||||
try:
|
||||
base64.b64decode(pieces[1])
|
||||
except:
|
||||
except Exception as e:
|
||||
raise ValidationError("Incorrect base64 encoded key!")
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user