summaryrefslogtreecommitdiffstats
path: root/Lib/telnetlib.py
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2010-12-14 14:16:20 (GMT)
committerR. David Murray <rdmurray@bitdance.com>2010-12-14 14:16:20 (GMT)
commit32ef70c827997f869a8d8393e8bde74016b6c8a9 (patch)
tree2fb7aafb76221a226502a6fb5d52fcd536ade964 /Lib/telnetlib.py
parent8edd99d0852c45f70b6abc851e6b326d4250cd33 (diff)
downloadcpython-32ef70c827997f869a8d8393e8bde74016b6c8a9.zip
cpython-32ef70c827997f869a8d8393e8bde74016b6c8a9.tar.gz
cpython-32ef70c827997f869a8d8393e8bde74016b6c8a9.tar.bz2
#10695: use %s not %d so that a string 'port' does not cause a debug traceback
Passing the port as a string value works fine in regular mode, but if you turned debug on it would throw an error trying to print the port number, which is surprising and confusing.
Diffstat (limited to 'Lib/telnetlib.py')
-rw-r--r--Lib/telnetlib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/telnetlib.py b/Lib/telnetlib.py
index c60578d..82b5e8f 100644
--- a/Lib/telnetlib.py
+++ b/Lib/telnetlib.py
@@ -236,7 +236,7 @@ class Telnet:
"""
if self.debuglevel > 0:
- print('Telnet(%s,%d):' % (self.host, self.port), end=' ')
+ print('Telnet(%s,%s):' % (self.host, self.port), end=' ')
if args:
print(msg % args)
else: