From ca71c03d12adfa26bf19a18c60245bdf6494afdc Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Thu, 27 Apr 2017 12:34:58 +0200 Subject: [bug] use argv for the argparse prog name in the cli User - Resolves: #8829 --- src/leap/bitmask/cli/user.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/leap/bitmask/cli/user.py b/src/leap/bitmask/cli/user.py index 1ab36302..fc1d2960 100644 --- a/src/leap/bitmask/cli/user.py +++ b/src/leap/bitmask/cli/user.py @@ -50,7 +50,6 @@ SUBCOMMANDS: self.data.append('user') def create(self, raw_args): - args = tuple([command.appname] + sys.argv[1:4]) passwd = None for (index, item) in enumerate(raw_args): @@ -60,7 +59,7 @@ SUBCOMMANDS: parser = argparse.ArgumentParser( description='Bitmask user', - prog='%s %s %s %s' % args) + prog='%s %s %s' % tuple(sys.argv[:3])) parser.add_argument('--invitecode', **_invitecode_kw) parser.add_argument('username', **_username_kw) @@ -124,10 +123,9 @@ SUBCOMMANDS: return defer.succeed(None) def _username(self, raw_args, needed=False): - args = tuple([command.appname] + sys.argv[1:3]) parser = argparse.ArgumentParser( description='Bitmask user', - prog='%s %s %s' % args) + prog='%s %s %s' % tuple(sys.argv[:3])) parser.add_argument('username', **_username_kw) subargs = parser.parse_args(raw_args) -- cgit v1.2.3