Declare THEME as global before assignment in `main`

pull/80/head
Claudio Jolowicz 2020-08-22 14:09:14 +02:00
parent 00e2d6675b
commit c6a3c4b3ec
No known key found for this signature in database
GPG Key ID: E6BDB18E3A5888BF
1 changed files with 3 additions and 1 deletions

View File

@ -4368,8 +4368,10 @@ def process_keys():
CPU_NAME: str = get_cpu_name() CPU_NAME: str = get_cpu_name()
THEME: Theme
def main(): def main():
global THEME
#? Init --------------------------------------------------------------------------------------> #? Init -------------------------------------------------------------------------------------->
if DEBUG: TimeIt.start("Init") if DEBUG: TimeIt.start("Init")
@ -4388,7 +4390,7 @@ def main():
if CONFIG.show_init: if CONFIG.show_init:
Draw.buffer("+init!", f'{Mv.restore}{Fx.trans("Loading theme and creating colors... ")}{Mv.save}') Draw.buffer("+init!", f'{Mv.restore}{Fx.trans("Loading theme and creating colors... ")}{Mv.save}')
try: try:
THEME: Theme = Theme(CONFIG.color_theme) THEME = Theme(CONFIG.color_theme)
except Exception as e: except Exception as e:
Init.fail(e) Init.fail(e)
else: else: