Fix T56372: Properly show error messages when submission fails

This also introduces a word-wrapping function that takes variable character
widths into account.
This commit is contained in:
2018-08-14 15:05:37 +02:00
parent 9ed933760c
commit 7b88d7704c
4 changed files with 100 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
import threading
import typing
class G:
@@ -19,6 +20,8 @@ class G:
current_progress = 0.0
progress_lock = threading.Lock()
submission_exception: typing.Optional[Exception] = None
@classmethod
def reset(cls):
"""Reset the global state."""
@@ -29,3 +32,4 @@ class G:
cls.background_image_path = ""
cls.scene_status = {}
cls.results_submitted = False
cls.submission_exception = None