mirror of
https://github.com/glomatico/gamdl.git
synced 2025-01-22 11:18:39 +00:00
replace print_exceptions
with no_exceptions
This commit is contained in:
parent
3998b698e0
commit
afbe65707a
12
gamdl/cli.py
12
gamdl/cli.py
@ -125,9 +125,9 @@ def load_config_file(
|
|||||||
help="Log level.",
|
help="Log level.",
|
||||||
)
|
)
|
||||||
@click.option(
|
@click.option(
|
||||||
"--print-exceptions",
|
"--no-exceptions",
|
||||||
is_flag=True,
|
is_flag=True,
|
||||||
help="Print exceptions.",
|
help="Don't print exceptions.",
|
||||||
)
|
)
|
||||||
# API specific options
|
# API specific options
|
||||||
@click.option(
|
@click.option(
|
||||||
@ -318,7 +318,7 @@ def main(
|
|||||||
no_synced_lyrics: bool,
|
no_synced_lyrics: bool,
|
||||||
config_path: Path,
|
config_path: Path,
|
||||||
log_level: str,
|
log_level: str,
|
||||||
print_exceptions: bool,
|
no_exceptions: bool,
|
||||||
cookies_path: Path,
|
cookies_path: Path,
|
||||||
language: str,
|
language: str,
|
||||||
output_path: Path,
|
output_path: Path,
|
||||||
@ -354,7 +354,7 @@ def main(
|
|||||||
)
|
)
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
logger.setLevel(log_level)
|
logger.setLevel(log_level)
|
||||||
logger.debug("Starting downloader")
|
logger.info("Starting Gamdl")
|
||||||
if not cookies_path.exists():
|
if not cookies_path.exists():
|
||||||
logger.critical(X_NOT_FOUND_STRING.format("Cookies file", cookies_path))
|
logger.critical(X_NOT_FOUND_STRING.format("Cookies file", cookies_path))
|
||||||
return
|
return
|
||||||
@ -470,7 +470,7 @@ def main(
|
|||||||
error_count += 1
|
error_count += 1
|
||||||
logger.error(
|
logger.error(
|
||||||
f'({url_progress}) Failed to check "{url}"',
|
f'({url_progress}) Failed to check "{url}"',
|
||||||
exc_info=print_exceptions,
|
exc_info=not no_exceptions,
|
||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
for download_index, track_metadata in enumerate(
|
for download_index, track_metadata in enumerate(
|
||||||
@ -762,7 +762,7 @@ def main(
|
|||||||
error_count += 1
|
error_count += 1
|
||||||
logger.error(
|
logger.error(
|
||||||
f'({queue_progress}) Failed to download "{track_metadata["attributes"]["name"]}"',
|
f'({queue_progress}) Failed to download "{track_metadata["attributes"]["name"]}"',
|
||||||
exc_info=print_exceptions,
|
exc_info=not no_exceptions,
|
||||||
)
|
)
|
||||||
finally:
|
finally:
|
||||||
if temp_path.exists():
|
if temp_path.exists():
|
||||||
|
Loading…
Reference in New Issue
Block a user