mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-22 14:02:24 +01:00
Fix rendering of task errors
This commit is contained in:
parent
6b9614314c
commit
f9048a8f49
@ -55,7 +55,10 @@ def check(id):
|
||||
if current_user.is_authenticated and current_user.rank.at_least(UserRank.ADMIN):
|
||||
info["error"] = str(traceback)
|
||||
elif str(result)[1:12] == "TaskError: ":
|
||||
info["error"] = str(result)[12:-1]
|
||||
if hasattr(result, "value"):
|
||||
info["error"] = result.value
|
||||
else:
|
||||
info["error"] = str(result)
|
||||
else:
|
||||
info["error"] = "Unknown server error"
|
||||
else:
|
||||
|
@ -12,7 +12,7 @@
|
||||
<h1>{{ self.title() }}</h1>
|
||||
|
||||
{% if "error" in info or info.status == "FAILURE" or info.status == "REVOKED" %}
|
||||
<pre>{{ info.error }}</pre>
|
||||
<pre style="white-space: pre-wrap; word-wrap: break-word;">{{ info.error }}</pre>
|
||||
{% else %}
|
||||
<script src="/static/js/polltask.js"></script>
|
||||
<script>
|
||||
|
Loading…
Reference in New Issue
Block a user