Coding style.

- EXCEPTION is private.
This commit is contained in:
Andrew Hamilton 2022-01-06 00:12:41 +10:00
parent bc90382ecb
commit 8b1ae082db

View file

@ -409,7 +409,7 @@ class Fixed:
########################## ##########################
EXCEPTION = None _EXCEPTION = None
_LAST_APPEARANCE = [] _LAST_APPEARANCE = []
@ -418,8 +418,8 @@ def handle_exception(func):
try: try:
return func(*args) return func(*args)
except Exception as exc: except Exception as exc:
global EXCEPTION global _EXCEPTION
EXCEPTION = exc _EXCEPTION = exc
SHUTDOWN_EVENT.set() SHUTDOWN_EVENT.set()
return wrapper return wrapper
@ -489,8 +489,8 @@ async def tui(title, screen_widget):
loop.remove_reader(sys.stdin) loop.remove_reader(sys.stdin)
finally: finally:
update_task.cancel() update_task.cancel()
if EXCEPTION is not None: if _EXCEPTION is not None:
raise EXCEPTION raise _EXCEPTION
########################## ##########################