From: James Andrewartha Date: Mon, 26 Oct 2009 03:04:14 +0000 (+0800) Subject: it's always good to assign variables before use X-Git-Url: https://git.ucc.asn.au/?p=uccdoor.git;a=commitdiff_plain;h=620f3cc801bd3da168c09bb71412144e966cb2d7;ds=sidebyside it's always good to assign variables before use --- diff --git a/client-xmpp.py b/client-xmpp.py index 6eebce7..7d8d9dd 100755 --- a/client-xmpp.py +++ b/client-xmpp.py @@ -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)