aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@torproject.org>2013-06-05 15:48:57 +0200
committerLinus Nordberg <linus@torproject.org>2013-06-13 16:37:02 +0200
commit562b8f19cf2032f7899f0ff5a829625683d0b3c4 (patch)
treedbec285eb7290d8ac468a5e5c0e98340c6fd7420
parenta0be5e2f5979cd20928a34091a5bd7f40866a3bb (diff)
downloadchutney-562b8f19cf2032f7899f0ff5a829625683d0b3c4.tar
chutney-562b8f19cf2032f7899f0ff5a829625683d0b3c4.tar.gz
Make 'chutney status' indicate result in exit code.
-rw-r--r--lib/chutney/TorNet.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/chutney/TorNet.py b/lib/chutney/TorNet.py
index dcaf7d8..33eb05c 100644
--- a/lib/chutney/TorNet.py
+++ b/lib/chutney/TorNet.py
@@ -589,6 +589,9 @@ class Network(object):
statuses = [ n.getController().check() for n in self._nodes]
n_ok = len([x for x in statuses if x])
print "%d/%d nodes are running"%(n_ok,len(self._nodes))
+ if n_ok != len(self._nodes):
+ return False
+ return True
def restart(self):
self.stop()