mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-21 04:42:22 -06:00
Fix pycodestyle errors
Mainly two kind of errors: * pokemon exceptions * invalid escape sequences
This commit is contained in:
@@ -26,7 +26,7 @@ def validate_rsa_key(key, is_secret=True):
|
||||
raise forms.ValidationError("This looks like a private key. Please provide your public RSA key.")
|
||||
try:
|
||||
PKCS1_OAEP.new(key)
|
||||
except:
|
||||
except Exception:
|
||||
raise forms.ValidationError("Error validating RSA key. Please ensure that your key supports PKCS#1 OAEP.")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user