summaryrefslogtreecommitdiff
path: root/paramiko/dsskey.py
diff options
context:
space:
mode:
authorScott Maxwell <scott@codecobblers.com>2013-10-30 16:46:33 -0700
committerScott Maxwell <scott@codecobblers.com>2013-10-30 16:46:33 -0700
commit2ea352b8baf1037bd22fc79146ef646c163a7692 (patch)
tree439892d24b7659bb4345790af09582aaa0162377 /paramiko/dsskey.py
parent6bd1e42b43017c8df3edd826fad5aca798538b10 (diff)
downloadparamiko-2ea352b8baf1037bd22fc79146ef646c163a7692.tar.gz
Fix dict iters, sorts, exceptions, bytes renames and tuple args
Diffstat (limited to 'paramiko/dsskey.py')
-rw-r--r--paramiko/dsskey.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/paramiko/dsskey.py b/paramiko/dsskey.py
index f6ecb2a7..ff744888 100644
--- a/paramiko/dsskey.py
+++ b/paramiko/dsskey.py
@@ -184,8 +184,8 @@ class DSSKey (PKey):
# DSAPrivateKey = { version = 0, p, q, g, y, x }
try:
keylist = BER(data).decode()
- except BERException, x:
- raise SSHException('Unable to parse key file: ' + str(x))
+ except BERException:
+ raise SSHException('Unable to parse key file: ' + str(sys.exc_info()[1]))
if (type(keylist) is not list) or (len(keylist) < 6) or (keylist[0] != 0):
raise SSHException('not a valid DSA private key file (bad ber encoding)')
self.p = keylist[1]