diff --git a/paramiko/hostkeys.py b/paramiko/hostkeys.py
index <HASH>..<HASH> 100644
--- a/paramiko/hostkeys.py
+++ b/paramiko/hostkeys.py
@@ -329,7 +329,7 @@ class HostKeyEntry:
                 return None
 
         except binascii.Error as e:
-            raise InvalidHostKey(line, sys.exc_info()[1])
+            raise InvalidHostKey(line, e)
 
         return cls(names, key)
     from_line = classmethod(from_line)
Remove an old Py<I>-ism