changeset 1588:823a385235ef

jp: fixed bad --connect option check
author Goffi <goffi@goffi.org>
date Sat, 14 Nov 2015 19:18:10 +0100
parents 698d6755d62a
children add1a6c8c594
files frontends/src/jp/base.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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