Skip to content

Commit dacb804

Browse files
committed
Merged revisions 87230 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87230 | r.david.murray | 2010-12-14 09:16:20 -0500 (Tue, 14 Dec 2010) | 7 lines #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. ........
1 parent 79af245 commit dacb804

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

Lib/telnetlib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def msg(self, msg, *args):
236236
237237
"""
238238
if self.debuglevel > 0:
239-
print 'Telnet(%s,%d):' % (self.host, self.port),
239+
print 'Telnet(%s,%s):' % (self.host, self.port),
240240
if args:
241241
print msg % args
242242
else:

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ Core and Builtins
1818
Library
1919
-------
2020

21+
- Issue #10695: passing the port as a string value to telnetlib no longer
22+
causes debug mode to fail.
23+
2124
- Issue #10107: Warn about unsaved files in IDLE on OSX.
2225

2326
- Issue #10406: Enable Rstrip IDLE extension on OSX (just like on other

0 commit comments

Comments
 (0)