it's always good to assign variables before use
authorJames Andrewartha <trs80@ucc.gu.uwa.edu.au>
Mon, 26 Oct 2009 03:04:14 +0000 (11:04 +0800)
committerJames Andrewartha <trs80@ucc.gu.uwa.edu.au>
Mon, 26 Oct 2009 03:04:14 +0000 (11:04 +0800)
client-xmpp.py

index 6eebce7..7d8d9dd 100755 (executable)
@@ -48,8 +48,8 @@ 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)

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