summaryrefslogtreecommitdiff
path: root/morphlib/buildcommand.py
diff options
context:
space:
mode:
Diffstat (limited to 'morphlib/buildcommand.py')
-rw-r--r--morphlib/buildcommand.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/morphlib/buildcommand.py b/morphlib/buildcommand.py
index 37dccf82..efd10f26 100644
--- a/morphlib/buildcommand.py
+++ b/morphlib/buildcommand.py
@@ -525,10 +525,11 @@ class InitiatorBuildCommand(BuildCommand):
RECONNECT_INTERVAL = 30 # seconds
MAX_RETRIES = 1
- def __init__(self, app, addr, port):
+ def __init__(self, app, addr, port, allow_detach):
self.app = app
self.addr = addr
self.port = port
+ self.allow_detach = allow_detach
self.app.settings['push-build-branches'] = True
super(InitiatorBuildCommand, self).__init__(app)
@@ -546,10 +547,15 @@ class InitiatorBuildCommand(BuildCommand):
loop = distbuild.MainLoop()
args = [repo_name, ref, filename, original_ref or ref,
component_names]
+ if self.allow_detach:
+ initiator_type = distbuild.InitiatorStart
+ else:
+ initiator_type = distbuild.Initiator
+
cm = distbuild.InitiatorConnectionMachine(self.app,
self.addr,
self.port,
- distbuild.Initiator,
+ initiator_type,
[self.app] + args,
self.RECONNECT_INTERVAL,
self.MAX_RETRIES)