removing () from ifs and foo==0 becomes not foo in an if

This commit is contained in:
Nikos Kouremenos 2005-05-19 17:50:19 +00:00
parent 781261b99d
commit 148fe12a2d
1 changed files with 2 additions and 2 deletions

View File

@ -610,7 +610,7 @@ class Connection:
signed = ''
if self.connected < 2:
self.dispatch('BAD_PASSPHRASE', ())
if (show != 'offline') and (self.connected == 0):
if show != 'offline' and not self.connected:
self.connection = self.connect()
if self.connected == 2:
self.connected = STATUS_LIST.index(show)
@ -631,7 +631,7 @@ class Connection:
iq.setTag(common.xmpp.NS_VCARD + ' vCard')
self.connection.send(iq)
self.myVCardID.append(iq.getID())
elif (show == 'offline') and self.connected:
elif show == 'offline' and self.connected:
self.connected = 0
if self.connection:
self.connection.send(common.xmpp.Presence(typ = 'unavailable',