[Patches] [ python-Patches-1350658 ] Redundant connect() call in logging.handlers.SysLogHandler

SourceForge.net noreply at sourceforge.net
Tue Nov 8 14:41:32 CET 2005


Patches item #1350658, was opened at 2005-11-07 20:14
Message generated for change (Comment added) made by vsajip
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1350658&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Ken Lalonde (kenlalonde)
>Assigned to: Vinay Sajip (vsajip)
Summary: Redundant connect() call in logging.handlers.SysLogHandler

Initial Comment:
Visual inspection of _connect_unixsocket() in
Lib/logging/handlers.py
shows that, in the absence of an exception, a DGRAM
socket will always be connected twice.  This is likely
harmless, but also pointless.

The attached patch against today's CVS simply omits the
second connect() call.

----------------------------------------------------------------------

>Comment By: Vinay Sajip (vsajip)
Date: 2005-11-08 13:41

Message:
Logged In: YES 
user_id=308438

The bug is valid but the patch is not :-( The exception
clause tries to open a TCP socket and this needs to be
connected. So the correct fix (I think) is to indent the
second connect() call. I will check the change into SVN later.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1350658&group_id=5470


More information about the Patches mailing list