Mercurial > bitten > bitten-test
changeset 796:031ce03d2baf
Don't initialize the keep-alive thread when running a local build (it will fail trying to get the opener).
author | osimons |
---|---|
date | Fri, 14 May 2010 10:48:04 +0000 |
parents | 8f12cd7ea767 |
children | fcdc7fa56b1f |
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)