mirror of
https://github.com/sotam0316/docker-py-revanced.git
synced 2026-04-24 19:38:36 +09:00
🚨 Updated lints (#308)
This commit is contained in:
@@ -5,7 +5,7 @@ from environs import Env
|
||||
from loguru import logger
|
||||
|
||||
from src.config import RevancedConfig
|
||||
from src.exceptions import AppNotFound, PatchesJsonLoadFailed, PatchingFailed
|
||||
from src.exceptions import AppNotFoundError, PatchesJsonLoadError, PatchingFailedError, UnknownError
|
||||
from src.parser import Parser
|
||||
from src.patches import Patches
|
||||
from src.utils import check_java, extra_downloads
|
||||
@@ -19,13 +19,14 @@ def main() -> None:
|
||||
env.read_env()
|
||||
config = RevancedConfig(env)
|
||||
extra_downloads(config)
|
||||
check_java(config.dry_run)
|
||||
if not config.dry_run:
|
||||
check_java()
|
||||
|
||||
logger.info(f"Will Patch only {config.apps}")
|
||||
for app in config.apps:
|
||||
logger.info(f"Trying to build {app}")
|
||||
for possible_app in config.apps:
|
||||
logger.info(f"Trying to build {possible_app}")
|
||||
try:
|
||||
app = APP(app_name=app, config=config)
|
||||
app = APP(app_name=possible_app, config=config)
|
||||
patcher = Patches(config, app)
|
||||
parser = Parser(patcher, config)
|
||||
app_all_patches = patcher.get_app_configs(app)
|
||||
@@ -33,13 +34,13 @@ def main() -> None:
|
||||
patcher.include_exclude_patch(app, parser, app_all_patches)
|
||||
logger.info(app)
|
||||
parser.patch_app(app)
|
||||
except AppNotFound as e:
|
||||
except AppNotFoundError as e:
|
||||
logger.info(e)
|
||||
except PatchesJsonLoadFailed:
|
||||
except PatchesJsonLoadError:
|
||||
logger.exception("Patches.json not found")
|
||||
except PatchingFailed as e:
|
||||
except PatchingFailedError as e:
|
||||
logger.exception(e)
|
||||
except Exception as e:
|
||||
except UnknownError as e:
|
||||
logger.exception(f"Failed to build {app} because of {e}")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user