[reprotest] 01/02: Properly adhere to the setuptools console_scripts interface

Ximin Luo infinity0 at debian.org
Mon Nov 28 21:39:02 UTC 2016


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository reprotest.

commit 4fd1dcd1593774e5455313312d5d10ddcb43118e
Author: Ximin Luo <infinity0 at debian.org>
Date:   Mon Nov 28 21:30:30 2016 +0100

    Properly adhere to the setuptools console_scripts interface
    
    - console_scripts expects a function of 0 arguments
---
 reprotest/__init__.py | 4 ++--
 reprotest/__main__.py | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/reprotest/__init__.py b/reprotest/__init__.py
index 22d2a4a..f7c7fb7 100644
--- a/reprotest/__init__.py
+++ b/reprotest/__init__.py
@@ -559,12 +559,12 @@ def command_line(*argv):
     return types.MappingProxyType({k:v for k, v in vars(args).items() if v is not None})
 
 
-def main(*args):
+def main():
     config_options = config()
 
     # Argparse exits with status code 2 if something goes wrong, which
     # is already the right status exit code for reprotest.
-    command_line_options = command_line(*args)
+    command_line_options = command_line(*sys.argv[1:])
 
     # Command-line arguments override config file settings.
     build_command = command_line_options.get(
diff --git a/reprotest/__main__.py b/reprotest/__main__.py
index 6002309..a16c418 100644
--- a/reprotest/__main__.py
+++ b/reprotest/__main__.py
@@ -5,4 +5,4 @@ import sys
 from reprotest import main
 
 if __name__ == '__main__':
-    sys.exit(main(*sys.argv[1:]))
+    sys.exit(main())

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/reprotest.git



More information about the Reproducible-commits mailing list