Skip to content

Commit

Permalink
🚧 Add debug statements before argument parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlin committed Dec 14, 2023
1 parent 9523beb commit 1a392e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nextstrain/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from .argparse import HelpFormatter, register_commands, register_default_command
from .command import build, view, deploy, remote, shell, update, setup, check_setup, login, logout, whoami, version, init_shell, authorization, debugger
from .debug import DEBUGGING
from .debug import DEBUGGING, debug
from .errors import NextstrainCliError, UsageError
from .util import warn
from .__version__ import __version__ # noqa: F401 (for re-export)
Expand All @@ -30,6 +30,7 @@ def run(args):
`nextstrain` program.
"""
parser = make_parser()
debug("Parsing arguments…")
opts = parser.parse_args(args)

try:
Expand Down
3 changes: 3 additions & 0 deletions nextstrain/cli/command/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
from getpass import getpass
from inspect import cleandoc
from os import environ

from nextstrain.cli.debug import debug
from ..authn import current_user, login, renew
from ..errors import UserError

Expand All @@ -26,6 +28,7 @@


def register_parser(subparser):
debug("Registering parser…")
parser = subparser.add_parser("login", help = "Log into Nextstrain.org")

parser.add_argument(
Expand Down

0 comments on commit 1a392e7

Please sign in to comment.