From 0d8eb26db9155e11bc552964967bf5f2db456dfc Mon Sep 17 00:00:00 2001 From: Jordan Thompson Date: Mon, 17 Apr 2023 14:18:39 -0700 Subject: [PATCH] Update WAS_Node_Suite.py Patch legacy text type for fresh install --- WAS_Node_Suite.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/WAS_Node_Suite.py b/WAS_Node_Suite.py index a1c4222..26c62d7 100644 --- a/WAS_Node_Suite.py +++ b/WAS_Node_Suite.py @@ -139,6 +139,7 @@ if not os.path.exists(WAS_CONFIG_FILE): print(f'\033[34mWAS Node Suite:\033[0m Created default conf file at `{WAS_CONFIG_FILE}`.') else: print(f'\033[34mWAS Node Suite\033[0m Error: Unable to create default conf file at `{WAS_CONFIG_FILE}`.') + else: was_config = getSuiteConfig() @@ -150,14 +151,6 @@ else: if update_config: updateSuiteConfig(was_config) - - # SET TEXT TYPE - TEXT_TYPE = "TEXT" - if was_config.__contains__('use_legacy_ascii_text'): - if was_config['use_legacy_ascii_text']: - TEXT_TYPE = "ASCII" - print(f'\033[34mWAS Node Suite\033[0m Warning: use_legacy_ascii_text is `True` in `was_suite_config.json`. `ASCII` type is deprecated and the default will be `TEXT` in the future.') - # Convert WebUI Styles if was_config.__contains__('webui_styles'): @@ -195,7 +188,13 @@ else: print(f'\033[34mWAS Node Suite:\033[0m Styles import complete.') - +# SET TEXT TYPE +TEXT_TYPE = "TEXT" +if was_config.__contains__('use_legacy_ascii_text'): + if was_config['use_legacy_ascii_text']: + TEXT_TYPE = "ASCII" + print(f'\033[34mWAS Node Suite\033[0m Warning: use_legacy_ascii_text is `True` in `was_suite_config.json`. `ASCII` type is deprecated and the default will be `TEXT` in the future.') + #! SUITE SPECIFIC CLASSES & FUNCTIONS