# HG changeset patch # User Goffi # Date 1446498161 -3600 # Node ID 3d5193b4c58270e470a4b04c8ecceb1a63c4ed84 # Parent 62596ec69bbd48faf3a3c9d7fa87bb1a8e2640bf jp: separate password and connection of profile in --connect and --pwd arguments diff -r 62596ec69bbd -r 3d5193b4c582 frontends/src/jp/base.py --- a/frontends/src/jp/base.py Mon Nov 02 22:02:37 2015 +0100 +++ b/frontends/src/jp/base.py Mon Nov 02 22:02:41 2015 +0100 @@ -111,7 +111,8 @@ profile_parent = self.parents['profile'] = argparse.ArgumentParser(add_help=False) profile_parent.add_argument("-p", "--profile", action="store", type=str, default='@DEFAULT@', help=_("Use PROFILE profile key (default: %(default)s)")) - profile_parent.add_argument("-c", "--connect", action="store", type=str, nargs='?', const='', default=None, metavar='PASSWORD', help=_("Connect the profile before doing anything else")) + profile_parent.add_argument("--pwd", action="store", type=unicode, default='', metavar='PASSWORD', help=_("Password used to connect profile, if necessary")) + profile_parent.add_argument("-c", "--connect", action="store_true", help=_("Connect the profile before doing anything else")) progress_parent = self.parents['progress'] = argparse.ArgumentParser(add_help=False) if progressbar: @@ -243,7 +244,7 @@ # a profile can be presente 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 - self.bridge.asyncConnect(self.profile, self.args.connect, lambda dummy: callback(), cant_connect) + self.bridge.asyncConnect(self.profile, self.args.pwd, lambda dummy: callback(), cant_connect) self._auto_loop = True return elif not self.bridge.isConnected(self.profile):