aboutsummaryrefslogtreecommitdiff
path: root/lava_dispatcher
diff options
context:
space:
mode:
authorNeil Williams <neil.williams@linaro.org>2018-07-24 09:19:34 +0000
committerNeil Williams <neil.williams@linaro.org>2018-07-24 09:19:39 +0000
commit407db2b4531d49b3a90a9e04e8d2035ff5b4e0fe (patch)
tree0981f165a8bc05fd42b5d3ab9cbc73e39e9238e9 /lava_dispatcher
parentf2d4490fdd7d2b7ff5009ac6b65d7f6b5b3877dd (diff)
Revert "Raise a JobError when a cmd output is empty"
Merge in haste, revert at leisure. This reverts commit 953df9325ae9e8783a141aa7f87686019ef4b938. Change-Id: I934539b3c325878c76f2db99df398136794e7967
Diffstat (limited to 'lava_dispatcher')
-rw-r--r--lava_dispatcher/action.py8
-rw-r--r--lava_dispatcher/test/test_devices.py3
2 files changed, 4 insertions, 7 deletions
diff --git a/lava_dispatcher/action.py b/lava_dispatcher/action.py
index a771ebfeb..40f440ad5 100644
--- a/lava_dispatcher/action.py
+++ b/lava_dispatcher/action.py
@@ -503,12 +503,8 @@ class Action(object): # pylint: disable=too-many-instance-attributes,too-many-p
return False
# allow for commands which return no output
- if not log:
- if allow_silent:
- return self.errors == []
- else:
- self.logger.error("The command hasn't output anything")
- raise JobError("Unable to call %s" % command_list)
+ if not log and allow_silent:
+ return self.errors == []
else:
for line in log.split("\n"):
self.logger.debug('output: %s', line)
diff --git a/lava_dispatcher/test/test_devices.py b/lava_dispatcher/test/test_devices.py
index 659d8b42e..5d3914a23 100644
--- a/lava_dispatcher/test/test_devices.py
+++ b/lava_dispatcher/test/test_devices.py
@@ -220,7 +220,8 @@ class TestCommand(StdoutTestCase):
def test_silent(self):
fake = FakeAction()
command = 'true'
- self.assertRaises(JobError, fake.run_command, command.split(' '))
+ log = fake.run_command(command.split(' '))
+ self.assertEqual(log, '')
self.assertEqual([], fake.errors)
def test_allow_silent(self):