add logging of status returned
authorJames Andrewartha <[email protected]>
Tue, 20 Oct 2009 07:13:04 +0000 (15:13 +0800)
committerJames Andrewartha <[email protected]>
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
-            if results['error'] == 0: return -1
             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)
@@ -80,7 +80,9 @@ class Door(dbus.service.Object):
         except:
             newstatus = -1
         
+        syslog.syslog(142, "status, newstatus for %s is %i, %i" % (servicename, status, newstatus))
         if newstatus != self.status:
+            syslog.syslog(142, "status changed detected for  %s" % servicename)
             self.status = newstatus
             # emit signal
             self.status_changed(newstatus)

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