From 23b26b713a76e127f4d5073be5b776366b45616a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Jastrz=C4=99bski?= Date: Thu, 25 Mar 2021 22:16:05 +0100 Subject: [PATCH] Improved Classic client detection --- CB/GitHub.py | 2 +- CB/__init__.py | 2 +- CurseBreaker.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CB/GitHub.py b/CB/GitHub.py index 815a984..161a7df 100644 --- a/CB/GitHub.py +++ b/CB/GitHub.py @@ -38,7 +38,7 @@ def get_latest_package(self): latestclassic = None for release in self.payload['assets']: if release['name'] and '-nolib' not in release['name'] \ - and release['content_type'] in ['application/x-zip-compressed', 'application/zip']: + and release['content_type'] in {'application/x-zip-compressed', 'application/zip'}: if not latest and not release['name'].endswith('-classic.zip'): latest = release['browser_download_url'] elif not latestclassic and release['name'].endswith('-classic.zip'): diff --git a/CB/__init__.py b/CB/__init__.py index 5fa957d..39d0cf5 100644 --- a/CB/__init__.py +++ b/CB/__init__.py @@ -2,7 +2,7 @@ import random from rich.terminal_theme import TerminalTheme -__version__ = '3.17.4' +__version__ = '3.17.5' __license__ = 'GPLv3' __copyright__ = '2019-2021, Paweł Jastrzębski ' __docformat__ = 'restructuredtext en' diff --git a/CurseBreaker.py b/CurseBreaker.py index 14a968f..e83efd0 100644 --- a/CurseBreaker.py +++ b/CurseBreaker.py @@ -72,7 +72,7 @@ def start(self): pause(self.headless) sys.exit(1) # Detect Classic client - if os.path.basename(os.getcwd()) == '_classic_': + if os.path.basename(os.getcwd()) in {'_classic_', '_classic_beta_', '_classic_ptr_'}: self.core.clientType = 'wow_classic' set_terminal_title(f'CurseBreaker v{__version__} - Classic') # Check if client have write access @@ -95,7 +95,7 @@ def start(self): sys.exit(1) self.setup_table() # CurseForge URI Support - if len(sys.argv) == 2 and any(x in sys.argv[1] for x in ['twitch://', 'curseforge://']): + if len(sys.argv) == 2 and any(x in sys.argv[1] for x in {'twitch://', 'curseforge://'}): try: self.c_install(sys.argv[1].strip()) except Exception as e: