# HG changeset patch # User Goffi # Date 1447525090 -3600 # Node ID 823a385235ef1c15674f7aa1893d11520f9605f3 # Parent 698d6755d62a40afd1368753f1858af3784ffa48 jp: fixed bad --connect option check diff -r 698d6755d62a -r 823a385235ef frontends/src/jp/base.py --- a/frontends/src/jp/base.py Sat Nov 14 19:18:10 2015 +0100 +++ b/frontends/src/jp/base.py Sat Nov 14 19:18:10 2015 +0100 @@ -221,7 +221,7 @@ return dest_jids 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 @exit: - 1 when profile is not connected and --connect is not set @@ -241,9 +241,9 @@ self.quit(1) 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 - 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._auto_loop = True return