20 is still causing in use errors, try 30 seconds
[uccdoor.git] / client-xmpp.py
index 6eebce7..2344158 100755 (executable)
@@ -48,11 +48,11 @@ class Door(object):
             syslog.syslog(142, "get_status failed: %s" % e)
             pass
         
-        self.state_changed(new_state)
         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, newstate)
+        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

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