Skip to content

Commit 2fc9d31

Browse files
committed
fix(cli): wrap version check in try except
stops failing pypi query from breaking cli
1 parent 5611e27 commit 2fc9d31

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

dtcli/utilities/utilities.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,5 +128,8 @@ def cli_is_latest_release() -> bool:
128128
"""Check if CLI is latest release."""
129129
from pkg_resources import get_distribution
130130

131-
current_version = parse(get_distribution("datatrail-cli").version)
132-
return current_version == get_latest_released_version()
131+
try:
132+
current_version = parse(get_distribution("datatrail-cli").version)
133+
return current_version == get_latest_released_version()
134+
except ConnectionError:
135+
return True

0 commit comments

Comments
 (0)