summaryrefslogtreecommitdiff
path: root/paramiko
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2023-01-16 22:00:33 -0500
committerJeff Forcier <jeff@bitprophet.org>2023-01-18 20:19:24 -0500
commit25eb7ca836acf5ea3a56cabfba9d33b08c4a6dd5 (patch)
tree00130133c2a740efa40bfbb41f208e70a61126cf /paramiko
parenta4157b42306a1af2315818841785569fd7a4d6e4 (diff)
downloadparamiko-25eb7ca836acf5ea3a56cabfba9d33b08c4a6dd5.tar.gz
Handpick remaining-ly relevant changes from #2110
Also make 'em f-strings, which AFAIK should be comparable Closes #2110
Diffstat (limited to 'paramiko')
-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)}")