[jhbuild] goalreport: mark check as n/a if check script exit code is 1
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] goalreport: mark check as n/a if check script exit code is 1
- Date: Sun, 13 May 2012 13:49:27 +0000 (UTC)
commit e4388f16f5be0437e4109e248ba40b402a07c5be
Author: FrÃdÃric PÃters <fpeters 0d be>
Date: Sun May 13 15:31:37 2012 +0200
goalreport: mark check as n/a if check script exit code is 1
jhbuild/commands/goalreport.py | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/jhbuild/commands/goalreport.py b/jhbuild/commands/goalreport.py
index c44f14f..b125240 100644
--- a/jhbuild/commands/goalreport.py
+++ b/jhbuild/commands/goalreport.py
@@ -152,9 +152,14 @@ class ShellCheck(Check):
if not self.cmds:
self.cmds = [self.cmd]
outputs = []
+ rc = 0
for cmd in self.cmds:
- outputs.append(subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True,
- cwd=self.module.branch.srcdir).communicate()[0].strip())
+ process = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True,
+ cwd=self.module.branch.srcdir)
+ outputs.append(process.communicate()[0].strip())
+ rc = process.wait() or rc
+ if rc == 1:
+ raise ExcludedModuleException()
nb_lines = sum([len(x.splitlines()) for x in outputs])
if nb_lines == 0:
self.status = 'ok'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]