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.
........
This commit is contained in:
R. David Murray 2010-12-14 14:27:27 +00:00
parent d382066d2c
commit 6b2af997d4
3 changed files with 14 additions and 1 deletions

View file

@ -236,7 +236,7 @@ def msg(self, msg, *args):
"""
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: