Skip to content

Commit

Permalink
ENH: take Satra's advice and be more more user-friendly in bad_versio…
Browse files Browse the repository at this point in the history
…n message
  • Loading branch information
yarikoptic committed Jul 22, 2021
1 parent eb5ba9d commit 9ac410b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions dandi/cli/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,17 @@ def main(ctx, log_level, pdb=False):
etelemetry.check_available_version(
"dandi/dandi-cli", __version__, lgr=lgr, raise_exception=True
)
except etelemetry.client.BadVersionError as exc:
except etelemetry.client.BadVersionError:
# note: SystemExit is based of BaseException, so is not Exception
raise SystemExit(str(exc))
raise SystemExit(
"DANDI CLI has detected that you are using a version that is known to "
"contain bugs, is incompatible with our current data archive, or has "
"other significant performance limitations. "
"To continue using DANDI CLI, please upgrade your dandi client to a newer "
"version (e.g., using pip install --upgrade dandi if you installed using pip). "
"If you have any issues, please contact the DANDI "
"helpdesk at https://github.com/dandi/helpdesk/issues/new/choose ."
)
except Exception as exc:
lgr.warning(
"Failed to check for a more recent version available with etelemetry: %s",
Expand Down

0 comments on commit 9ac410b

Please sign in to comment.