Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2559 from pypeclub/feature/OP-2399_Webpublisher-B…
Browse files Browse the repository at this point in the history
…etter-error-messages-for-users

Webpublisher: Moved error at the beginning of the log
  • Loading branch information
kalisp authored Jan 20, 2022
2 parents 1a60389 + 3b6e030 commit d9143b9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions openpype/lib/remote_publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ def publish_and_log(dbcon, _id, log, close_plugin_name=None):
close host app
"""
# Error exit as soon as any error occurs.
error_format = "Failed {plugin.__name__}: {error} -- {error.traceback}"
error_format = "Failed {plugin.__name__}: {error} -- {error.traceback}\n"
error_format += "-" * 80 + "\n"

close_plugin = _get_close_plugin(close_plugin_name, log)

Expand All @@ -114,7 +115,7 @@ def publish_and_log(dbcon, _id, log, close_plugin_name=None):
if result["error"]:
log.error(error_format.format(**result))
uninstall()
log_lines.append(error_format.format(**result))
log_lines = [error_format.format(**result)] + log_lines
dbcon.update_one(
{"_id": _id},
{"$set":
Expand Down

0 comments on commit d9143b9

Please sign in to comment.