Skip to content
Snippets Groups Projects
Commit 13e213eb authored by William Salmon's avatar William Salmon
Browse files

Catch Non Numeric versions

This patch just displays a better message than the default stack trace
but dose not try to fix the problem. A further patch will be created but
it effects versioneer so may take longer to land as it may need to go
via versioneer mainline.
parent 4e1160a9
No related branches found
No related tags found
No related merge requests found
......@@ -484,8 +484,13 @@ def get_bst_version():
raise UtilError("Your git repository has no tags - BuildStream can't "
"determine its version. Please run `git fetch --tags`.")
return (int(versions[0]), int(versions[1]))
try:
return (int(versions[0]), int(versions[1]))
except Exception:
# We should try a mitigation hear, like falling back to a previous version.
raise UtilError("Cannot detect numeric Major and Minor version numbers\n"
"Version: {} not in Interger.Interger.whatever format"
.format(__version__))
@contextmanager
def save_file_atomic(filename, mode='w', *, buffering=-1, encoding=None,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment