summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2006-08-02 19:58:16 +0000
committerNarayan Desai <desai@mcs.anl.gov>2006-08-02 19:58:16 +0000
commit4f1bc68f101fd396a7556d84949850f12ba9a0db (patch)
treee6df7be51d9ba51b2da7190f33a0c2726f433774 /src
parent9f129bdd9f08139a5cb1cd7d1bd3c05ce0cfe9da (diff)
downloadbcfg2-4f1bc68f101fd396a7556d84949850f12ba9a0db.tar.gz
bcfg2-4f1bc68f101fd396a7556d84949850f12ba9a0db.tar.bz2
bcfg2-4f1bc68f101fd396a7556d84949850f12ba9a0db.zip
Fix another syslog reconnect error path
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2029 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Logging.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/Logging.py b/src/lib/Logging.py
index f2401791e..f898696f9 100644
--- a/src/lib/Logging.py
+++ b/src/lib/Logging.py
@@ -111,8 +111,13 @@ class FragmentingSysLogHandler(logging.handlers.SysLogHandler):
try:
self.socket.send(msg)
except socket.error:
- self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
- self.socket.connect(self.address)
+ while True:
+ try:
+ self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
+ self.socket.connect(self.address)
+ break
+ except socket.error:
+ continue
self.socket.send("Reconnected to syslog")
self.socket.send(msg)