integ/devtools/python/python_2.7.3/syslog_bugfix.patch
Dean Troyer 3cd12006bb StarlingX open source release updates
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2018-05-31 07:36:35 -07:00

20 lines
692 B
Diff

---
Lib/logging/handlers.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/Lib/logging/handlers.py
+++ b/Lib/logging/handlers.py
@@ -742,7 +742,11 @@ class SysLogHandler(logging.Handler):
except socket.error:
self.socket.close()
self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
- self.socket.connect(address)
+ try:
+ self.socket.connect(address)
+ except socket.error:
+ self.socket.close()
+ raise
# curious: when talking to the unix-domain '/dev/log' socket, a
# zero-terminator seems to be required. this string is placed