From: James Andrewartha Date: Sun, 25 Oct 2009 13:37:30 +0000 (+0800) Subject: print debugging goes better with dbus-monitor X-Git-Url: https://git.ucc.asn.au/?p=uccdoor.git;a=commitdiff_plain;h=f3611890611e436484fc213b39b8a4f5bd691cd6;ds=sidebyside print debugging goes better with dbus-monitor --- diff --git a/client-xmpp.py b/client-xmpp.py index 0f52bf0..6eebce7 100755 --- a/client-xmpp.py +++ b/client-xmpp.py @@ -49,8 +49,10 @@ class Door(object): pass self.state_changed(new_state) + self.doorname = doorname def state_changed(self, new_state): + print "xmpp state change detected for %s from %i to %i" % (self.doorname, self.state, newstate) self.state = new_state # look up the dictionary object for the current state, then construct # a presence object using that as a keyword argument