@@ -271,10 +271,14 @@ class SystemInfo:
return not missing_requirements
class Builder:
- def __init__(self, instance, njobs, sysinfo):
+ def __init__(self, instance, njobs, sysinfo,
+ http_url, http_login, http_password):
self.instance = instance
self.njobs = njobs
self.sysinfo = sysinfo
+ self.http_url = http_url
+ self.http_login = http_login
+ self.http_password = http_password
def prepare_build(self, **kwargs):
"""Prepare for the next build of the specified instance
@@ -681,11 +685,11 @@ class Builder:
# none of the ones that are part of the standard library can
# upload a file without writing dozens of lines of code.
ret = subprocess.call(["curl", "-u",
- "%s:%s" % (kwargs['http_login'], kwargs['http_password']),
+ "%s:%s" % (self.http_login, self.http_password),
"-H", "Expect:",
"-F", "uploadedfile=@%s" % os.path.join(outputdir, "results.tar.bz2"),
"-F", "uploadsubmit=1",
- kwargs['http_url']],
+ self.http_url],
stdout=log, stderr=log)
if ret != 0:
log_write(log, "INFO: results could not be submitted, %d" % ret)
@@ -848,11 +852,11 @@ def main():
builder = Builder(
instance = i,
njobs = args['--njobs'],
- sysinfo = sysinfo)
+ sysinfo = sysinfo,
+ http_url = args['--http-url'],
+ http_login = args['--http-login'],
+ http_password = args['--http-password'])
p = multiprocessing.Process(target=builder.run_instance, kwargs=dict(
- http_url = args['--http-url'],
- http_login = args['--http-login'],
- http_password = args['--http-password'],
submitter = args['--submitter'],
make_opts = (args['--make-opts'] or ''),
nice = (args['--nice'] or 0),