Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download: Refactor CLI commands and introduce --download-configs as well as --container-library. #2336

Merged
merged 14 commits into from
Jun 27, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions nf_core/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import rich_click as click

from nf_core import __version__
from nf_core.modules.modules_repo import NF_CORE_MODULES_REMOTE
from nf_core.download import DownloadError
from nf_core.modules.modules_repo import NF_CORE_MODULES_REMOTE
from nf_core.utils import check_if_outdated, rich_force_colors, setup_nfcore_dir

# Set up logging as the root logger
Expand Down Expand Up @@ -71,13 +71,13 @@

# Define exceptions for which no traceback should be printed,
# because they are actually preliminary, but intended program terminations.
# (cleaner than `sys.exit(1)`, which we were using before)
# (Custom exceptions are cleaner than `sys.exit(1)`, which we used before)
def selective_traceback_hook(exctype, value, traceback):
if exctype in {DownloadError}: # extend as needed
if exctype in {DownloadError}: # extend set as needed
log.error(value)
else:
# for all other exceptions, print the full traceback
sys.__excepthook__(exctype, value, traceback)
# print the colored traceback for all other exceptions with rich as usual
stderr.print(rich.traceback.Traceback.from_exception(exctype, value, traceback))
MatthiasZepper marked this conversation as resolved.
Show resolved Hide resolved


sys.excepthook = selective_traceback_hook
Expand Down