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 giampaolo.rodola
Recipients giampaolo.rodola, paulos, r.david.murray
Date 2011-02-23.01:49:33
SpamBayes Score 3.275158e-15
Marked as misclassified No
Message-id <1298425775.41.0.702016082885.issue11281@psf.upfronthosting.co.za>
In-reply-to
Content
Follow my comments:

> +                 source_address=('', 0)):

Make that default to None instead and pass it as-is to socket.create_connection().

> +        self.source_address = source_address

There's no need to store the source address as an instance attribute. 
Just pass it as-is to socket.create_connection() in __init__ and connect methods and then get rid of it.


I think source_address no longer makes sense in UNIX sockets / LMTP class. 
Or at least, this is what I get if I try to bind() a UNIX socket:

>>> import socket
>>> sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
>>> sock.bind(("", 0))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<string>", line 1, in bind
TypeError: argument must be string or read-only character buffer, not tuple
>>>
History
Date User Action Args
2011-02-23 01:49:48giampaolo.rodolasetrecipients: + giampaolo.rodola, r.david.murray, paulos
2011-02-23 01:49:35giampaolo.rodolasetmessageid: <1298425775.41.0.702016082885.issue11281@psf.upfronthosting.co.za>
2011-02-23 01:49:33giampaolo.rodolalinkissue11281 messages
2011-02-23 01:49:33giampaolo.rodolacreate