summaryrefslogtreecommitdiffstats
path: root/build_tools/bin/bld_resource.py
diff options
context:
space:
mode:
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)