fixed typo at include guards
[svn42.git] / update-web-status.py
index e2eec66..7c297ce 100755 (executable)
@@ -200,7 +200,7 @@ while True:
     if not os.path.exists(socketfile):
       logging.debug("Socketfile '%s' not found, waiting 5 secs" % socketfile)
       time.sleep(5)
-      continue    
+      continue
     sockhandle = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
     sockhandle.connect(socketfile)
     conn = os.fdopen(sockhandle.fileno())
@@ -212,6 +212,9 @@ while True:
       
       uwscfg.checkConfigUpdates()
       
+      if line == "":
+        raise Exception("EOF on Socket, daemon seems to have quit")
+      
       m = RE_STATUS.match(line)
       if not m is None:
         status = m.group(1)
@@ -235,5 +238,6 @@ while True:
       sockhandle.close()
     except:
       pass
+    conn=None
+    sockhandle=None      
     time.sleep(5)
-