From 562b8f19cf2032f7899f0ff5a829625683d0b3c4 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Wed, 5 Jun 2013 15:48:57 +0200 Subject: Make 'chutney status' indicate result in exit code. --- lib/chutney/TorNet.py | 3 +++ 1 file changed, 3 insertions(+) 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() -- cgit v1.2.3