summaryrefslogtreecommitdiff
path: root/paramiko/util.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2023-01-11 20:24:13 -0500
committerJeff Forcier <jeff@bitprophet.org>2023-01-11 20:24:13 -0500
commitec8948158e26df0ec549e333cc2ea4bb22d56350 (patch)
tree605531478922a9b56d867e8044387711f32b68d2 /paramiko/util.py
parent19a00412bfecd43d4fa6a13459955ccb13f29e02 (diff)
downloadparamiko-ec8948158e26df0ec549e333cc2ea4bb22d56350.tar.gz
blacken
Diffstat (limited to 'paramiko/util.py')
-rw-r--r--paramiko/util.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/paramiko/util.py b/paramiko/util.py
index 5e2f6392..5a21977e 100644
--- a/paramiko/util.py
+++ b/paramiko/util.py
@@ -29,7 +29,14 @@ import traceback
import threading
import logging
-from paramiko.common import DEBUG, zero_byte, xffffffff, max_byte, byte_ord, byte_chr
+from paramiko.common import (
+ DEBUG,
+ zero_byte,
+ xffffffff,
+ max_byte,
+ byte_ord,
+ byte_chr,
+)
from paramiko.config import SSHConfig
@@ -67,7 +74,7 @@ def deflate_long(n, add_sign_padding=True):
for i in enumerate(s):
if (n == 0) and (i[1] != 0):
break
- if (n == -1) and (i[1] != 0xff):
+ if (n == -1) and (i[1] != 0xFF):
break
else:
# degenerate case, n was either 0 or -1
@@ -330,6 +337,7 @@ def b(s, encoding="utf8"):
else:
raise TypeError("Expected unicode or bytes, got {!r}".format(s))
+
# TODO: clean this up / force callers to assume bytes OR unicode
def u(s, encoding="utf8"):
"""cast bytes or unicode to unicode"""