add logging of status returned
authorJames Andrewartha <trs80@ucc.gu.uwa.edu.au>
Tue, 20 Oct 2009 07:13:04 +0000 (15:13 +0800)
committerJames Andrewartha <trs80@ucc.gu.uwa.edu.au>
Tue, 20 Oct 2009 07:13:04 +0000 (15:13 +0800)
server.py

index 69a0d7e..5f7b571 100755 (executable)
--- a/server.py
+++ b/server.py
@@ -31,8 +31,8 @@ def check_LAT_service(servicename, retries=3):
             wfh.flush()
         except:
             results['error'] -= 1
             wfh.flush()
         except:
             results['error'] -= 1
-            if results['error'] == 0: return -1
             syslog.syslog(142, "c_L_s write error:" + servicename)
             syslog.syslog(142, "c_L_s write error:" + servicename)
+            if results['error'] == 0: return -1
             continue
         syslog.syslog(142, "c_Ls written data to " + servicename)
         rr, wr, er = select([rfh], [], [], 3.0)
             continue
         syslog.syslog(142, "c_Ls written data to " + servicename)
         rr, wr, er = select([rfh], [], [], 3.0)
@@ -80,7 +80,9 @@ class Door(dbus.service.Object):
         except:
             newstatus = -1
         
         except:
             newstatus = -1
         
+        syslog.syslog(142, "status, newstatus for %s is %i, %i" % (servicename, status, newstatus))
         if newstatus != self.status:
         if newstatus != self.status:
+            syslog.syslog(142, "status changed detected for  %s" % servicename)
             self.status = newstatus
             # emit signal
             self.status_changed(newstatus)
             self.status = newstatus
             # emit signal
             self.status_changed(newstatus)

UCC git Repository :: git.ucc.asn.au