SCIENTIFIC-LINUX-USERS Archives

November 2012

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Connie Sieh <[log in to unmask]>
Reply To:
Connie Sieh <[log in to unmask]>
Date:
Fri, 9 Nov 2012 15:49:59 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (51 lines)
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
>

ATOM RSS1 RSS2