-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extent OS version with Name and Variant #221
Conversation
Because the __cmp__ function was implemented with string cmp it would mean that 3.9.0 would be > than 3.10.0.
|
||
try: | ||
self._major_version = '.'.join(version.split('.')[0:2]) | ||
except: | ||
self._major_version = version | ||
|
||
def to_issue(self): | ||
return "{} {} {} \\l".format(self._os, self._codename, self._number) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be called on old version files? Since it's in the updater.
Maybe it would be more robust to keep this additional information in a separate file, and not change the format of the existing file.
kano_updater/os_version.py
Outdated
return "{} {} {} \\l".format(self._os, self._codename, self._number) | ||
vstr = "{} {} {}".format(self._os, self._devstage, self._number) | ||
# Add the name and variant to the string only if they exist. | ||
vstr += ' ' + self._name if self._name else '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ealdwulf To your point from above, yes the function can be called on the old file, hence why here I append an empty string when the name
cannot be found.
I was careful to preserve backwards compatibility here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, you're doing it there. Okay :-)
Related to https://trello.com/c/8HLyQFpt/87-add-tracking-event-that-lets-us-know-a-kit-is-in-argentina
This one needs careful reviewing @tombettany @Ealdwulf @skarbat