mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
pype subprocess returns output and log out error when subprocess crashed
This commit is contained in:
parent
c6d5e1fe2f
commit
2f09bfee87
3 changed files with 7 additions and 3 deletions
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue