mirror of
https://github.com/sotam0316/docker-py-revanced.git
synced 2026-04-25 03:48:37 +09:00
🐛 Handle a case when no rec version is available
This commit is contained in:
@@ -122,11 +122,14 @@ class Patches(object):
|
|||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
patches = getattr(self, app_name)
|
patches = getattr(self, app_name)
|
||||||
version = ""
|
version = ""
|
||||||
|
try:
|
||||||
if app in ("youtube", "youtube_music"):
|
if app in ("youtube", "youtube_music"):
|
||||||
version = next(i["version"] for i in patches if i["version"] != "all")
|
version = next(i["version"] for i in patches if i["version"] != "all")
|
||||||
logger.debug(f"Recommended Version for patching {app} is {version}")
|
logger.debug(f"Recommended Version for patching {app} is {version}")
|
||||||
else:
|
else:
|
||||||
logger.debug("No recommended version.")
|
logger.debug("No recommended version.")
|
||||||
|
except StopIteration:
|
||||||
|
pass # No recommended version available
|
||||||
return patches, version
|
return patches, version
|
||||||
|
|
||||||
# noinspection IncorrectFormatting
|
# noinspection IncorrectFormatting
|
||||||
|
|||||||
Reference in New Issue
Block a user