This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Christian.S..Perone
Recipients Christian.S..Perone
Date 2010-12-13.19:27:04
SpamBayes Score 4.9855564e-11
Marked as misclassified No
Message-id <1292268429.73.0.383087651932.issue10695@psf.upfronthosting.co.za>
In-reply-to
Content
When you use telnetlib with a "str" parameter as Port Number:
tel = telnetlib.Telnet("10.0.2.9", "8123")
tel.read_until("login: ")

It works fine, except if you set the debuglevel:
tel.set_debuglevel(30)

Then the follow exception is thrown:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "c:\python26\lib\telnetlib.py", line 306, in read_until
    self.fill_rawq()
  File "c:\python26\lib\telnetlib.py", line 517, in fill_rawq
    self.msg("recv %r", buf)
  File "c:\python26\lib\telnetlib.py", line 239, in msg
    print 'Telnet(%s,%d):' % (self.host, self.port),
TypeError: %d format: a number is required, not str

I think that the string "Telnet(%s,%d):" on the telnetlib.py should be "Telnet(%s,%s):", since it works fine with a str as Port Number.
History
Date User Action Args
2010-12-13 19:27:10Christian.S..Peronesetrecipients: + Christian.S..Perone
2010-12-13 19:27:09Christian.S..Peronesetmessageid: <1292268429.73.0.383087651932.issue10695@psf.upfronthosting.co.za>
2010-12-13 19:27:04Christian.S..Peronelinkissue10695 messages
2010-12-13 19:27:04Christian.S..Peronecreate