summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Colmer <philip.colmer@linaro.org>2014-01-20 13:52:59 +0000
committerPhilip Colmer <philip.colmer@linaro.org>2014-01-20 13:52:59 +0000
commitc009571d19cdf145bedcdf19c2217789f57d2718 (patch)
tree472fa36599bf742ed1538eedadd617795354bc17
parent4c52910432e3f0d07cedfdafe2d6a9fa80085841 (diff)
Added extra stage change file and corrected logic for file count.
-rw-r--r--from_1_to_4.sh4
-rw-r--r--healthcheck.py2
2 files changed, 5 insertions, 1 deletions
diff --git a/from_1_to_4.sh b/from_1_to_4.sh
new file mode 100644
index 0000000..1c9e81b
--- /dev/null
+++ b/from_1_to_4.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+echo From 1 to 4
+sleep 10
+echo Script finished
diff --git a/healthcheck.py b/healthcheck.py
index 0892db1..0359e4b 100644
--- a/healthcheck.py
+++ b/healthcheck.py
@@ -164,7 +164,7 @@ class HealthCheck(object):
files = glob.glob("%s/%s" % (self.script_directory, filename))
if len(files) == 1:
os.system(files[0])
- else:
+ elif (len(files) > 1):
self.logmsg("more than one matching script for stage change %s to %s" % (str(self.last_state), str(new_state)))
else:
self.logmsg("Unexpected stage change from %s to %s" % (str(self.last_state), str(new_state)))