From: Christian Ruppert Date: Sun, 29 May 2011 10:57:11 +0000 (+0200) Subject: Allow only one arg for --arch/-a X-Git-Tag: gentoolkit-0.3.0.5~62 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a87846fbb8d3f88d37d8c295021921a6e136145c;p=gentoolkit.git Allow only one arg for --arch/-a Allowing multiple args for -a/--arch causes some trouble (depending on the order) E.g. "eshowkw cat/pkg -a a b" would work while "eshowkw -a a cat/pkg" wouldn't because it would count cat/pkg to the -a/--arch option. eshowkw -a amd64 kdelibs No ebuilds at "/root" --- diff --git a/pym/gentoolkit/eshowkw/__init__.py b/pym/gentoolkit/eshowkw/__init__.py index e0544a9..86c59b7 100644 --- a/pym/gentoolkit/eshowkw/__init__.py +++ b/pym/gentoolkit/eshowkw/__init__.py @@ -56,7 +56,7 @@ def process_args(argv): parser.add_argument('package', nargs='*', default=None, help='Packages to check.') - parser.add_argument('-a', '--arch', nargs='+', default=[], help='Display only specified arch(s)') + parser.add_argument('-a', '--arch', nargs=1, default=[], help='Display only specified arch(s)') parser.add_argument('-A', '--align', nargs='?', default='bottom', choices=['top', 'bottom'], help='Specify alignment for descriptions.')