summaryrefslogtreecommitdiff
path: root/paramiko/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'paramiko/util.py')
-rw-r--r--paramiko/util.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/paramiko/util.py b/paramiko/util.py
index 76941ff4..f1e33a50 100644
--- a/paramiko/util.py
+++ b/paramiko/util.py
@@ -323,7 +323,7 @@ def b(s, encoding="utf8"):
elif isinstance(s, str):
return s.encode(encoding)
else:
- raise TypeError("Expected unicode or bytes, got {!r}".format(s))
+ raise TypeError(f"Expected unicode or bytes, got {type(s)}")
# TODO: clean this up / force callers to assume bytes OR unicode
@@ -334,4 +334,4 @@ def u(s, encoding="utf8"):
elif isinstance(s, str):
return s
else:
- raise TypeError("Expected unicode or bytes, got {!r}".format(s))
+ raise TypeError(f"Expected unicode or bytes, got {type(s)}")