Gentoo Archives: gentoo-commits

From: "Tomas Chvatal (scarabeus)" <scarabeus@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoolkit r846 - in trunk/gentoolkit/pym/gentoolkit: equery eshowkw
Date: Tue, 02 Nov 2010 14:20:57
Message-Id: 20101102142049.C16A720051@flycatcher.gentoo.org
1 Author: scarabeus
2 Date: 2010-11-02 14:20:49 +0000 (Tue, 02 Nov 2010)
3 New Revision: 846
4
5 Modified:
6 trunk/gentoolkit/pym/gentoolkit/equery/keywords.py
7 trunk/gentoolkit/pym/gentoolkit/eshowkw/__init__.py
8 Log:
9 Die correctly when called indirectly with no package specified.
10
11 Modified: trunk/gentoolkit/pym/gentoolkit/equery/keywords.py
12 ===================================================================
13 --- trunk/gentoolkit/pym/gentoolkit/equery/keywords.py 2010-11-02 14:14:31 UTC (rev 845)
14 +++ trunk/gentoolkit/pym/gentoolkit/equery/keywords.py 2010-11-02 14:20:49 UTC (rev 846)
15 @@ -5,4 +5,4 @@
16 from gentoolkit.eshowkw import main as emain
17
18 def main(input_args):
19 - emain(input_args)
20 \ No newline at end of file
21 + emain(input_args, True)
22 \ No newline at end of file
23
24 Modified: trunk/gentoolkit/pym/gentoolkit/eshowkw/__init__.py
25 ===================================================================
26 --- trunk/gentoolkit/pym/gentoolkit/eshowkw/__init__.py 2010-11-02 14:14:31 UTC (rev 845)
27 +++ trunk/gentoolkit/pym/gentoolkit/eshowkw/__init__.py 2010-11-02 14:20:49 UTC (rev 846)
28 @@ -77,7 +77,7 @@
29
30 return parser.parse_args(args=argv)
31
32 -def main(argv):
33 +def main(argv, indirect = False):
34 global ignore_slots, bold, order, topper
35
36 #opts parsing
37 @@ -96,7 +96,7 @@
38 package = opts.package
39
40 # equery support
41 - if argv[0] == 'equery' and len(package) <= 0:
42 + if indirect and len(package) <= 0:
43 msg_err = 'No packages specified'
44 raise SystemExit(msg_err)