diff --git a/paramiko/py3compat.py b/paramiko/py3compat.py index 2228599..8842b98 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):