diff options
author | Jared Hobbs <jared@pyhacker.com> | 2018-11-27 18:01:19 -0700 |
---|---|---|
committer | Jared Hobbs <jared@pyhacker.com> | 2018-11-27 18:01:19 -0700 |
commit | 2dcdba72cf79f8bc1a72426c879afedf1fa47f72 (patch) | |
tree | 1cd01cccbc5119ba25b4dd441b022664d5e4abe2 | |
parent | 6b374a33f36c662a8c1c1deea44747de398d8da0 (diff) |
blacken, tests
-rw-r--r-- | paramiko/ecdsakey.py | 2 | ||||
-rw-r--r-- | paramiko/pkey.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/paramiko/ecdsakey.py b/paramiko/ecdsakey.py index 8b12520e..5f39867a 100644 --- a/paramiko/ecdsakey.py +++ b/paramiko/ecdsakey.py @@ -295,7 +295,7 @@ class ECDSAKey(PKey): curve, verkey, sigkey = self._uint32_cstruct_unpack(data, "sss") try: key = ec.derive_private_key(sigkey, curve, default_backend()) - except TypeError as e: + except (AttributeError, TypeError) as e: raise SSHException(str(e)) else: raise SSHException("unknown private key format.") diff --git a/paramiko/pkey.py b/paramiko/pkey.py index 84424218..6839ccc4 100644 --- a/paramiko/pkey.py +++ b/paramiko/pkey.py @@ -481,14 +481,14 @@ class PKey(object): # string s_size = struct.unpack(">L", data[idx : idx + 4])[0] idx += 4 - s = data[idx:idx + s_size] + s = data[idx : idx + s_size] idx += s_size arr.append(s) if f == "i": # long integer s_size = struct.unpack(">L", data[idx : idx + 4])[0] idx += 4 - s = data[idx:idx + s_size] + s = data[idx : idx + s_size] idx += s_size i = util.inflate_long(s, True) arr.append(i) |