changeset 797:7eaece84fe85 0.6.x

Merged [874] from trunk.
author osimons
date Fri, 14 May 2010 10:51:22 +0000
parents 23c551403e8b
children 4de39c41d489
files bitten/slave.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/bitten/slave.py
+++ b/bitten/slave.py
@@ -355,9 +355,10 @@
         build_id = build_url and int(build_url.split('/')[-1]) or 0
         xml = xmlio.parse(fileobj)
         basedir = ''
-        keepalive_thread = KeepAliveThread(self.opener, build_url, self.single_build, self.keepalive_interval)
         try:
             if not self.local:
+                keepalive_thread = KeepAliveThread(self.opener, build_url,
+                                    self.single_build, self.keepalive_interval)
                 keepalive_thread.start()
             recipe = Recipe(xml, os.path.join(self.work_dir, self.build_dir), 
                             self.config)
@@ -380,7 +381,8 @@
             if self.dry_run:
                 self._cancel_build(build_url)
         finally:
-            keepalive_thread.stop()
+            if not self.local:
+                keepalive_thread.stop()
             if not self.keep_files and os.path.isdir(basedir):
                 log.debug('Removing build directory %s' % basedir)
                 _rmtree(basedir)
Copyright (C) 2012-2017 Edgewall Software