X-Git-Url: https://git.ucc.asn.au/?p=uccdoor.git;a=blobdiff_plain;f=client-xmpp.py;h=2344158c828f4fbf2bef914baf97b2fdb77334ad;hp=78ce6e33a85d60ddcf1723cd40fa477d98277a83;hb=HEAD;hpb=1c5c2c9d2af9f0fba4616cac85e5beda7d3b3396 diff --git a/client-xmpp.py b/client-xmpp.py index 78ce6e3..2344158 100755 --- a/client-xmpp.py +++ b/client-xmpp.py @@ -44,13 +44,15 @@ class Door(object): try: new_state = self.remoteobj.get_status(dbus_interface='au.asn.ucc.DoorInterface') - except Exception as e: + except Exception, e: syslog.syslog(142, "get_status failed: %s" % e) pass + self.doorname = doorname self.state_changed(new_state) def state_changed(self, new_state): + print "xmpp state change detected for %s from %i to %i" % (self.doorname, self.state, new_state) self.state = new_state # look up the dictionary object for the current state, then construct # a presence object using that as a keyword argument