summaryrefslogtreecommitdiff
path: root/paramiko/auth_handler.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2017-08-28 15:37:55 -0700
committerJeff Forcier <jeff@bitprophet.org>2017-08-28 15:37:55 -0700
commit797777baad68a1e556d35ef05f346b54452bd7a1 (patch)
treea1b463d8e458ee5127053399e3be72067263f1a1 /paramiko/auth_handler.py
parent9f1d317b7a9a7c4beb55adaddb50cb19b784e204 (diff)
downloadparamiko-797777baad68a1e556d35ef05f346b54452bd7a1.tar.gz
2nd amendment doesn't grant the right to bare excepts
Diffstat (limited to 'paramiko/auth_handler.py')
-rw-r--r--paramiko/auth_handler.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/paramiko/auth_handler.py b/paramiko/auth_handler.py
index 6c515cb6..3d742c06 100644
--- a/paramiko/auth_handler.py
+++ b/paramiko/auth_handler.py
@@ -459,10 +459,9 @@ class AuthHandler (object):
INFO,
'Auth rejected: public key: %s' % str(e))
key = None
- except:
- self.transport._log(
- INFO,
- 'Auth rejected: unsupported or mangled public key')
+ except Exception as e:
+ msg = 'Auth rejected: unsupported or mangled public key ({0}: {1})' # noqa
+ self.transport._log(INFO, msg.format(e.__class__.__name__, e))
key = None
if key is None:
self._disconnect_no_more_auth()