-
Notifications
You must be signed in to change notification settings - Fork 46
Enforce that version is a string to prevent exceptions in the case of an all-integer version ID #119
Enforce that version is a string to prevent exceptions in the case of an all-integer version ID #119
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -378,7 +378,11 @@ def get_path_spec_from_yaml(yaml_dict): | |
| elif key == "uri": | ||
| uri = value | ||
| elif key == "version": | ||
| version = value | ||
| # VCs tools expects version to be | ||
| # string; otherwise, all integer | ||
| # versions will break application | ||
| if value is not None: | ||
| version = str(value) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Additionally, you could add
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So I addressed the issue here because it seemed to be caused due to the underlying
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, here is a good place for a fix. vcstools is a library in it's own right (potentially to be used by other projects), so if you have time, you could also make it less vulnerable, but it's a different story from this PR.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cool, I will take a look then to see what I can do with vcstools when I get a chance. |
||
| else: | ||
| raise MultiProjectException( | ||
| "Unknown key %s in %s" % (key, yaml_dict)) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.