From 8e331d241f4e60826d22ccf58e8d691f6232b174 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Mon, 22 May 2017 16:53:35 +0000 Subject: 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(-) (limited to 'bin') diff --git a/bin/reproducible_remote_scheduler.py b/bin/reproducible_remote_scheduler.py index d12b21d9..253ec520 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(): -- cgit v1.2.3-70-g09d2