summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Shahaf <danielsh@apache.org>2017-05-22 16:53:35 +0000
committerHolger Levsen <holger@layer-acht.org>2017-05-22 19:08:35 +0200
commit8e331d241f4e60826d22ccf58e8d691f6232b174 (patch)
treea0f2697199d44fc5d211c916448f48132f511f56
parenta7abae7a9ae57b95b1ae46b80701e348c3a122b6 (diff)
downloadjenkins.debian.net-8e331d241f4e60826d22ccf58e8d691f6232b174.tar.xz
reproducible Debian: Try to fix fcc7eddebc29220af97c65cdd523ba1f0893b264 issue about star imports in subscopes
-rwxr-xr-xbin/reproducible_remote_scheduler.py21
1 files changed, 14 insertions, 7 deletions
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():