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:
Mick Timony <[log in to unmask]>
Reply To:
Mick Timony <[log in to unmask]>
Date:
Fri, 9 Nov 2012 11:40:39 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (40 lines)
Hello,

I am running Python 2.6.6-29.el6_3.3 on Scientific Linux 6.2. 

Basically the Python SMTP code opens a socket and passes the host and port
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 the
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=_GLOBAL_DEFAULT_TIMEOUT):

at line number 540 in 

/usr/lib64/python2.6/socket.py 

The second line of code in the functions does the following:

host, port = 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?

Thanks

Mick Timony

ATOM RSS1 RSS2