From c6a3c4b3ec96961343a460d74250e9596fd5f9d0 Mon Sep 17 00:00:00 2001 From: Claudio Jolowicz Date: Sat, 22 Aug 2020 14:09:14 +0200 Subject: [PATCH] Declare THEME as global before assignment in `main` --- bpytop.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bpytop.py b/bpytop.py index 0cbdfd2..971a4b5 100755 --- a/bpytop.py +++ b/bpytop.py @@ -4368,8 +4368,10 @@ def process_keys(): CPU_NAME: str = get_cpu_name() +THEME: Theme def main(): + global THEME #? Init --------------------------------------------------------------------------------------> if DEBUG: TimeIt.start("Init") @@ -4388,7 +4390,7 @@ def main(): if CONFIG.show_init: Draw.buffer("+init!", f'{Mv.restore}{Fx.trans("Loading theme and creating colors... ")}{Mv.save}') try: - THEME: Theme = Theme(CONFIG.color_theme) + THEME = Theme(CONFIG.color_theme) except Exception as e: Init.fail(e) else: