pype subprocess returns output and log out error when subprocess crashed

This commit is contained in:
iLLiCiTiT 2019-09-04 11:10:52 +02:00
parent c6d5e1fe2f
commit 2f09bfee87
3 changed files with 7 additions and 3 deletions

View file

@ -31,7 +31,9 @@ def _subprocess(args):
output = proc.communicate()[0]
if proc.returncode != 0:
log.error(output)
raise ValueError("\"{}\" was not successful: {}".format(args, output))
return output
def get_hierarchy(asset_name=None):

View file

@ -94,7 +94,8 @@ class ExtractBurnin(pype.api.Extractor):
args = [executable, scriptpath, json_data]
self.log.debug("Executing: {}".format(args))
pype.api.subprocess(args)
output = pype.api.subprocess(args)
self.log.debug("Output: {}".format(output))
repre_update = {
"files": movieFileBurnin,

View file

@ -170,8 +170,9 @@ class ExtractReview(pyblish.api.InstancePlugin):
subprcs_cmd = " ".join(mov_args)
# run subprocess
self.log.debug("{}".format(subprcs_cmd))
pype.api.subprocess(subprcs_cmd)
self.log.debug("Executing: {}".format(subprcs_cmd))
output = pype.api.subprocess(subprcs_cmd)
self.log.debug("Output: {}".format(output))
# create representation data
repre_new.update({