summaryrefslogtreecommitdiffstats
path: root/build_tools/bin/bld_resource.py
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2009-10-01 05:51:39 (GMT)
committerJames Meyer <james.meyer@operamail.com>2009-10-01 05:51:39 (GMT)
commitb7dd2ea2aee7ecc21928d33405d31ad996a0e7e3 (patch)
treec7816c4c5ebe9c7bb3c8e74a735b5f83c9655cda /build_tools/bin/bld_resource.py
parentd965ca16468975fc34e040f022bc7382a6ded78a (diff)
downloadlinhes_dev-b7dd2ea2aee7ecc21928d33405d31ad996a0e7e3.zip
bld2:increase the timeout when spawning external cmds.
Diffstat (limited to 'build_tools/bin/bld_resource.py')
-rwxr-xr-xbuild_tools/bin/bld_resource.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/build_tools/bin/bld_resource.py b/build_tools/bin/bld_resource.py
index 30c5986..a972224 100755
--- a/build_tools/bin/bld_resource.py
+++ b/build_tools/bin/bld_resource.py
@@ -226,7 +226,7 @@ class MyThread(QtCore.QThread):
try:
logfile = "%s/%s.build.log" %(builddir,itemText)
f = open(logfile, 'w')
- child = pexpect.spawn(cmd,cwd=builddir)
+ child = pexpect.spawn(cmd,cwd=builddir,timeout=self.TIMEOUT)
for line in child:
f.write(line)
self.emit(SIGNAL("update_build(QString)"),line)
@@ -261,6 +261,7 @@ class MyThread(QtCore.QThread):
self.mparglist = mparglist
self.cmd_in = cmd_in
self.running = 0
+ self.TIMEOUT=300
self.start()
def run(self):
@@ -402,6 +403,7 @@ class run_cmd_thread(QtCore.QThread):
def value_init(self,runcmd,args):
self.runcmd = runcmd
self.args = args
+ self.TIMEOUT=300
self.start()
def run(self):
@@ -416,7 +418,7 @@ class run_cmd_thread(QtCore.QThread):
f = open(logfile, 'w')
outText="log files is: %s" %logfile
self.emit(SIGNAL("update(QString)"),outText)
- child = pexpect.spawn(str(self.runcmd),self.args)
+ child = pexpect.spawn(str(self.runcmd),self.args,timeout=self.TIMEOUT)
for line in child:
f.write(line)
self.emit(SIGNAL("update_build(QString)"),line)
@@ -425,9 +427,10 @@ class run_cmd_thread(QtCore.QThread):
retcode=child.exitstatus
f.write(str(retcode))
f.close()
- except:
+ except Exception, reason:
line = "****Exception happened: %s" %self.runcmd
self.emit(SIGNAL("update(QString)"),line)
+ self.emit(SIGNAL("update(QString)"),str(reason))
pass
self.emit(SIGNAL("enable_tab2(bool)"),True)