From 2a93698dc517c1e9f84dac3fabddbc6f1212b11c Mon Sep 17 00:00:00 2001 From: scarabeus Date: Tue, 2 Nov 2010 14:20:49 +0000 Subject: [PATCH] Die correctly when called indirectly with no package specified. svn path=/trunk/gentoolkit/; revision=846 --- pym/gentoolkit/equery/keywords.py | 2 +- pym/gentoolkit/eshowkw/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pym/gentoolkit/equery/keywords.py b/pym/gentoolkit/equery/keywords.py index f6ff607..be79fe3 100644 --- a/pym/gentoolkit/equery/keywords.py +++ b/pym/gentoolkit/equery/keywords.py @@ -5,4 +5,4 @@ from gentoolkit.eshowkw import main as emain def main(input_args): - emain(input_args) \ No newline at end of file + emain(input_args, True) \ No newline at end of file diff --git a/pym/gentoolkit/eshowkw/__init__.py b/pym/gentoolkit/eshowkw/__init__.py index 0ea4973..72be2f1 100644 --- a/pym/gentoolkit/eshowkw/__init__.py +++ b/pym/gentoolkit/eshowkw/__init__.py @@ -77,7 +77,7 @@ def process_args(argv): return parser.parse_args(args=argv) -def main(argv): +def main(argv, indirect = False): global ignore_slots, bold, order, topper #opts parsing @@ -96,7 +96,7 @@ def main(argv): package = opts.package # equery support - if argv[0] == 'equery' and len(package) <= 0: + if indirect and len(package) <= 0: msg_err = 'No packages specified' raise SystemExit(msg_err) -- 2.26.2