diff options
-rw-r--r-- | paramiko/py3compat.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/paramiko/py3compat.py b/paramiko/py3compat.py index 22285992..8842b988 100644 --- a/paramiko/py3compat.py +++ b/paramiko/py3compat.py @@ -113,7 +113,9 @@ else: return s def byte_ord(c): - assert isinstance(c, int) + # In case we're handed a string instead of an int. + if not isinstance(c, int): + c = ord(c) return c def byte_chr(c): |