Skip to content

Commit

Permalink
Improved Classic client detection
Browse files Browse the repository at this point in the history
  • Loading branch information
AcidWeb committed Mar 25, 2021
1 parent 1f7d9e0 commit 23b26b7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CB/GitHub.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'):
Expand Down
2 changes: 1 addition & 1 deletion CB/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>'
__docformat__ = 'restructuredtext en'
Expand Down
4 changes: 2 additions & 2 deletions CurseBreaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 23b26b7

Please sign in to comment.