[reprotest] 01/01: main: pull traceback-printing stuff out of the core code

Ximin Luo infinity0 at debian.org
Fri Sep 22 14:28:27 UTC 2017


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

infinity0 pushed a commit to branch master
in repository reprotest.

commit 8b03fcfefee5c53228ee507befdc4df08c9d9e92
Author: Ximin Luo <infinity0 at debian.org>
Date:   Fri Sep 22 16:27:36 2017 +0200

    main: pull traceback-printing stuff out of the core code
---
 reprotest/__init__.py | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/reprotest/__init__.py b/reprotest/__init__.py
index acf1814..ab0c9b1 100644
--- a/reprotest/__init__.py
+++ b/reprotest/__init__.py
@@ -258,15 +258,11 @@ def check(build_command, source_root, artifact_pattern, store_dir=None, no_clean
     # default argument [] is safe here because we never mutate it.
     with empty_or_temp_dir(store_dir, "store_dir") as result_dir:
         assert store_dir == result_dir or store_dir is None
-        try:
-            proc = corun_builds(
-                build_command, source_root, artifact_pattern, result_dir, no_clean_on_error,
-                virtual_server_args, testbed_pre, testbed_init, host_distro)
-            local_dists = [proc.send(nv) for nv in build_variations]
+        proc = corun_builds(
+            build_command, source_root, artifact_pattern, result_dir, no_clean_on_error,
+            virtual_server_args, testbed_pre, testbed_init, host_distro)
 
-        except Exception:
-            traceback.print_exc()
-            return 2
+        local_dists = [proc.send(nv) for nv in build_variations]
 
         retcodes = collections.OrderedDict(
             (bname, run_diff(local_dists[0], dist, diffoscope_args, store_dir))
@@ -569,7 +565,12 @@ def run(argv, check):
     if parsed_args.dry_run:
         return check_args
     else:
-        return check(**check_args)
+        try:
+            return check(**check_args)
+        except Exception:
+            traceback.print_exc()
+            return 125
+
 
 def main():
     r = run(sys.argv[1:], check)

-- 
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