Skip to content

Commit 46ad553

Browse files
committed
removing run_task from boshtask, small edit to run_task from shellcommand task
1 parent 8bdeed1 commit 46ad553

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

pydra/engine/boutiques.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -217,18 +217,3 @@ def _bosh_invocation_file(self, state_ind, ind=None):
217217
json.dump(input_json, jsonfile)
218218

219219
return str(filename)
220-
221-
def _run_task(self):
222-
self.output_ = None
223-
args = self.command_args
224-
if args:
225-
# removing empty strings
226-
args = [str(el) for el in args if el not in ["", " "]]
227-
keys = ["return_code", "stdout", "stderr"]
228-
values = execute(args, strip=self.strip)
229-
self.output_ = dict(zip(keys, values))
230-
if self.output_["return_code"]:
231-
if self.output_["stderr"]:
232-
raise RuntimeError(self.output_["stderr"])
233-
else:
234-
raise RuntimeError(self.output_["stdout"])

pydra/engine/task.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,13 +399,16 @@ def _run_task(self):
399399
else:
400400
args = self.command_args
401401
if args:
402-
# removing emty strings
402+
# removing empty strings
403403
args = [str(el) for el in args if el not in ["", " "]]
404404
keys = ["return_code", "stdout", "stderr"]
405405
values = execute(args, strip=self.strip)
406406
self.output_ = dict(zip(keys, values))
407407
if self.output_["return_code"]:
408-
raise RuntimeError(self.output_["stderr"])
408+
if self.output_["stderr"]:
409+
raise RuntimeError(self.output_["stderr"])
410+
else:
411+
raise RuntimeError(self.output_["stdout"])
409412

410413

411414
class ContainerTask(ShellCommandTask):

0 commit comments

Comments
 (0)