Skip to content

Commit

Permalink
Use 'returncode' instead of 'failure' and 'error'
Browse files Browse the repository at this point in the history
  • Loading branch information
will-moore committed Oct 18, 2023
1 parent 659d4c5 commit 760da8e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
<img alt="Running Script" src="{% static "webgateway/img/spinner.gif" %}" />

{% else %}
{% if j.error %}
{% if j.returncode and j.returncode > 0 %}
<div class='script_error' title="Script failed. Please see error logs">
<img alt="Failed to run script properly" src="{% static "webgateway/img/failed.png" %}" />
</div>
Expand Down
4 changes: 1 addition & 3 deletions omeroweb/webclient/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3815,11 +3815,9 @@ def activities(request, conn=None, **kwargs):
results = proc.getResults(0, conn.SERVICE_OPTS)
kwargs = {
"status": "finished",
"failure": cb.returncode,
"returncode": cb.returncode,
}
if cb.returncode != 0:
# This 'error' shows failure icon
kwargs["error"] = 1
kwargs["Message"] = (
f"Script exited with failure."
f" (returncode={ cb.returncode })"
Expand Down

0 comments on commit 760da8e

Please sign in to comment.