Make portageq exit with nonzero status when called incorrectly.
authorZac Medico <zmedico@gentoo.org>
Tue, 19 Sep 2006 22:01:20 +0000 (22:01 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 19 Sep 2006 22:01:20 +0000 (22:01 -0000)
svn path=/main/trunk/; revision=4483

bin/portageq

index f9527a253db7ee0df0aac73f94e4ca7a29b940e8..4166425ec67e000358a4ac7c52f8c355a46e0651 100755 (executable)
@@ -321,7 +321,7 @@ def usage(argv):
 def main():
        if (len(sys.argv) < 2) or ("-h" in sys.argv or "--help" in sys.argv):
                usage(sys.argv)
-               sys.exit()
+               sys.exit(os.EX_USAGE)
 
        cmd = sys.argv[1]
        try:
@@ -336,7 +336,7 @@ def main():
                function(sys.argv[2:])
        except KeyError:
                usage(sys.argv)
-               sys.exit()
+               sys.exit(os.EX_USAGE)
 
 main()