On Fri, 9 Nov 2012, Mick Timony wrote:
Hello,
I am running Python 2.6.6-29.el6_3.3 on Scientific Linux 6.2.=20
Basically the Python SMTP code opens a socket and passes the host and por=
t
arguments in the wrong order. There is a related Python bug report but it=
looks like the problem may only be fixed in Python 2.7 and 3.2:
http://bugs.python.org/issue13163
line number 273 in /usr/lib64/python2.6/smtplib.py opens a socket with th=
e
following arguments:
return socket.create_connection((port, host), timeout)
The arguments are in the wrong order and it should be:
return socket.create_connection((host, port), timeout)
create_connection is defined as
def create_connection(address, timeout=3D_GLOBAL_DEFAULT_TIMEOUT):
at line number 540 in=20
/usr/lib64/python2.6/socket.py=20
The second line of code in the functions does the following:
host, port =3D address
Which means that host will be assigned the port value and port will be
assigned to the host.
Will there be a fix for this for SC 6.2?
We only provide patches via TUV. So TUV will have to put a patch in. Do
you have example python code that uses smtplib.py and fails?
-Connie Sieh
Thanks
Mick Timony