Description of problem: I am having a problem (for reasons that I don't understand) that line 630 of handlers.py claims that unixsocket is undefined. One way that this can happen is if the socket creation (either _connect_unixsocket() or socket.socket()) throws an uncaught exception as unixsocket is defined after this point. Version-Release number of selected component (if applicable): python-2.4.4-1.fc6 How reproducible: Always (if you can get the socket creation to fail). Steps to Reproduce: 1. Turn of syslog / syslog-ng. 2. Run any python command that uses logging (e.g., yum check-update). 3. Actual results: The code throws an exception in the close(). Expected results: Additional info: The simplest solution is to set unixsocket=0 prior to the if and only set it to 1 after the socket is properly created: From: if type(address) == types.StringType: self._connect_unixsocket(address) self.unixsocket = 1 else: self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) self.unixsocket = 0 To: self.unixsocket = 0 if type(address) == types.StringType: self._connect_unixsocket(address) self.unixsocket = 1 else: self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
Already fixed in rawhide and I've committed the fix to the FC-6 branch of the python package for the next time I do an update of it.