[New-bugs-announce] [issue3725] telnetlib module broken by str to unicode conversion

Dmitry Vasiliev report at bugs.python.org
Fri Aug 29 14:43:46 CEST 2008


New submission from Dmitry Vasiliev <dima at hlabs.spb.ru>:

Simple example:

>>> from telnetlib import Telnet
>>> t = Telnet("google.com", 80)
>>> t.write("GET / HTTP/1.1\r\n")        
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/py3k/Lib/telnetlib.py", line 280, in write
    self.sock.sendall(buffer)
TypeError: sendall() argument 1 must be string or buffer, not str
>>> t.write(b"GET / HTTP/1.1\r\n")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/py3k/Lib/telnetlib.py", line 277, in write
    if IAC in buffer:
TypeError: Type str doesn't support the buffer API

----------
components: Library (Lib)
messages: 72131
nosy: hdima
severity: normal
status: open
title: telnetlib module broken by str to unicode conversion
type: crash
versions: Python 3.0

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3725>
_______________________________________


More information about the New-bugs-announce mailing list