From 1a392e761008dc7e13a69e545d4842f53bdae204 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Thu, 14 Dec 2023 15:56:15 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20Add=20debug=20statements=20befor?= =?UTF-8?q?e=20argument=20parsing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nextstrain/cli/__init__.py | 3 ++- nextstrain/cli/command/login.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/nextstrain/cli/__init__.py b/nextstrain/cli/__init__.py index 5c1b110d..287dd393 100644 --- a/nextstrain/cli/__init__.py +++ b/nextstrain/cli/__init__.py @@ -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) @@ -30,6 +30,7 @@ def run(args): `nextstrain` program. """ parser = make_parser() + debug("Parsing arguments…") opts = parser.parse_args(args) try: diff --git a/nextstrain/cli/command/login.py b/nextstrain/cli/command/login.py index 25f58e45..f11438b5 100644 --- a/nextstrain/cli/command/login.py +++ b/nextstrain/cli/command/login.py @@ -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 @@ -26,6 +28,7 @@ def register_parser(subparser): + debug("Registering parser…") parser = subparser.add_parser("login", help = "Log into Nextstrain.org") parser.add_argument(