summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/equery2
-rw-r--r--pym/gentoolkit/equery/__init__.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/bin/equery b/bin/equery
index 343f92d..35e9d7d 100755
--- a/bin/equery
+++ b/bin/equery
@@ -35,7 +35,7 @@ except KeyboardInterrupt:
from gentoolkit import equery, errors
try:
- equery.main()
+ equery.main(sys.argv)
except errors.GentoolkitNonZeroExit as err:
sys.exit(err.return_code)
except errors.GentoolkitException as err:
diff --git a/pym/gentoolkit/equery/__init__.py b/pym/gentoolkit/equery/__init__.py
index 9e8834b..a73ef1b 100644
--- a/pym/gentoolkit/equery/__init__.py
+++ b/pym/gentoolkit/equery/__init__.py
@@ -305,7 +305,7 @@ def split_arguments(args):
return args.pop(0), args
-def main():
+def main(argv):
"""Parse input and run the program."""
short_opts = "hqCNV"
@@ -316,7 +316,7 @@ def main():
initialize_configuration()
try:
- global_opts, args = getopt(sys.argv[1:], short_opts, long_opts)
+ global_opts, args = getopt(argv[1:], short_opts, long_opts)
except GetoptError as err:
sys.stderr.write(pp.error("Global %s" % err))
print_help(with_description=False)
@@ -359,4 +359,4 @@ def main():
raise
if __name__ == '__main__':
- main()
+ main(sys.argv)