jp: fixed bad --connect option check
This commit is contained in:
parent
ce4e717ea8
commit
aa097525e3
1 changed files with 3 additions and 3 deletions
|
|
@ -221,7 +221,7 @@ class Jp(object):
|
||||||
return dest_jids
|
return dest_jids
|
||||||
|
|
||||||
def connect_profile(self, callback):
|
def connect_profile(self, callback):
|
||||||
""" Check if the profile is connected
|
""" Check if the profile is connected and do it if requested
|
||||||
|
|
||||||
@param callback: method to call when profile is connected
|
@param callback: method to call when profile is connected
|
||||||
@exit: - 1 when profile is not connected and --connect is not set
|
@exit: - 1 when profile is not connected and --connect is not set
|
||||||
|
|
@ -241,9 +241,9 @@ class Jp(object):
|
||||||
self.quit(1)
|
self.quit(1)
|
||||||
|
|
||||||
if not hasattr(self.args, 'connect'):
|
if not hasattr(self.args, 'connect'):
|
||||||
# a profile can be presente without connect option (e.g. on profile creation/deletion)
|
# a profile can be present without connect option (e.g. on profile creation/deletion)
|
||||||
return
|
return
|
||||||
elif self.args.connect is not None: # if connection is asked, we connect the profile
|
elif self.args.connect is True: # if connection is asked, we connect the profile
|
||||||
self.bridge.asyncConnect(self.profile, self.args.pwd, lambda dummy: callback(), cant_connect)
|
self.bridge.asyncConnect(self.profile, self.args.pwd, lambda dummy: callback(), cant_connect)
|
||||||
self._auto_loop = True
|
self._auto_loop = True
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue