Skip to content

Commit 5a783bd

Browse files
committed
fix version split raised by bot (not from this PR)
1 parent bbb199b commit 5a783bd

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tests/integration/adapter/helpers.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ def below_version(major: int, minor: int = 0, _ch_test_version_value: Optional[s
1919
or os.environ.get('DBT_CH_TEST_CH_VERSION', '0.0')
2020
or '0.0' # Extra 0.0 to make Mypy happy
2121
)
22-
actual_major, actual_minor = current_version.split('.')
23-
return int(actual_major) < major or (int(actual_major) == major and int(actual_minor) < minor)
22+
parts = current_version.split('.')
23+
try:
24+
actual_major, actual_minor = int(parts[0]), int(parts[1])
25+
except (IndexError, ValueError):
26+
return False # treat 'latest', 'head', etc. as above any version threshold
27+
return actual_major < major or (actual_major == major and actual_minor < minor)
2428

2529

2630
retry_config = TypedDict('retry_config', {'max_retries': int, 'delay': float})

0 commit comments

Comments
 (0)