[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible Debian: Try to fix fcc7eddebc29220af97c65cdd523ba1f0893b264 issue about star imports in subscopes

Holger Levsen holger at layer-acht.org
Mon May 22 17:08:41 UTC 2017


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

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 8e331d241f4e60826d22ccf58e8d691f6232b174
Author: Daniel Shahaf <danielsh at apache.org>
Date:   Mon May 22 16:53:35 2017 +0000

    reproducible Debian: Try to fix fcc7eddebc29220af97c65cdd523ba1f0893b264 issue about star imports in subscopes
---
 bin/reproducible_remote_scheduler.py | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/bin/reproducible_remote_scheduler.py b/bin/reproducible_remote_scheduler.py
index d12b21d..253ec52 100755
--- a/bin/reproducible_remote_scheduler.py
+++ b/bin/reproducible_remote_scheduler.py
@@ -8,10 +8,23 @@
 #
 # A secure script to be called from remote hosts
 
+import os
 import sys
 import time
 import argparse
 from sqlalchemy import sql
+from reproducible_common import (
+    # Use an explicit list rather than a star import, because the previous code had
+    # a mysterious comment about not being able to do a star import prior to
+    # parsing the command line, & debugging the mystery via edit-compile-h01ger-run
+    # detours is not practical.
+    SUITES, ARCHS,
+    bcolors,
+    query_db, db_table, sql, conn_db,
+    datetime, timedelta,
+    irc_msg,
+)
+from reproducible_common import log
 
 def packages_matching_criteria(arch, suite, criteria):
     "Return a list of packages in (SUITE, ARCH) matching the given CRITERIA."
@@ -86,10 +99,6 @@ def parse_known_args():
     if scheduling_args.noisy:
         scheduling_args.notify = True
 
-    # these are here as an hack to be able to parse the command line
-    from reproducible_common import *
-    from reproducible_html_live_status import generate_schedule
-
     # this variable is expected to come from the remote host
     try:
         requester = os.environ['LC_USER']
@@ -174,9 +183,6 @@ def parse_known_args():
     return scheduling_args, requester
 
 def rest(scheduling_args, requester):
-    # these are here as an hack to be able to parse the command line in parse_args()
-    from reproducible_common import *
-
     # Shorter names
     suite = scheduling_args.suite
     arch = scheduling_args.architecture
@@ -334,6 +340,7 @@ def rest(scheduling_args, requester):
         if not dry_run:
             irc_msg(message)
 
+    from reproducible_html_live_status import generate_schedule
     generate_schedule(arch)  # update the HTML page
 
 def main():

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list