summaryrefslogtreecommitdiff
path: root/lorrycontroller
diff options
context:
space:
mode:
authorDaniel Silverstone <daniel.silverstone@codethink.co.uk>2012-10-02 11:32:44 +0100
committerDaniel Silverstone <daniel.silverstone@codethink.co.uk>2012-10-02 11:32:44 +0100
commit76aaa8ec8794d26af3c66de3d8956e5f90f9ec74 (patch)
treef45e0ded6cbbbcddc5bbf3a568b99f6453707763 /lorrycontroller
parent1b82571cf0373ca6928fc1757c626fe9dbc6c77b (diff)
downloadlorry-controller-76aaa8ec8794d26af3c66de3d8956e5f90f9ec74.tar.gz
Add dry-run capability
Diffstat (limited to 'lorrycontroller')
-rw-r--r--lorrycontroller/workingstate.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lorrycontroller/workingstate.py b/lorrycontroller/workingstate.py
index 239ee1f..2064005 100644
--- a/lorrycontroller/workingstate.py
+++ b/lorrycontroller/workingstate.py
@@ -32,7 +32,11 @@ class LorryFileRunner(object):
def run_lorry(self, *args):
cmdargs = list(args)
cmdargs.append(self.lorryfile)
- self.mgr.app.maybe_runcmd(cmdargs)
+ exit, out, err = self.mgr.app.maybe_runcmd(cmdargs)
+ if exit == 0:
+ logging.info("Lorry of %s succeeded: %s" % (self.lorryname, out))
+ else:
+ logging.warn("Lorry of %s failed: %s" % (self.lorryname, err))
class WorkingStateManager(object):
'''Manage the working state of lorry-controller'''