Skip to content
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

Merged
merged 7 commits into from
Feb 28, 2017
Merged

Extent OS version with Name and Variant #221

merged 7 commits into from
Feb 28, 2017

Conversation

radujipa
Copy link
Contributor

Radu added 2 commits February 22, 2017 14:49
Because the __cmp__ function was implemented with string cmp
it would mean that 3.9.0 would be > than 3.10.0.
@radujipa
Copy link
Contributor Author


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)
Copy link
Contributor

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.

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 ''
Copy link
Contributor Author

@radujipa radujipa Feb 22, 2017

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.

Copy link
Contributor

@Ealdwulf Ealdwulf Feb 22, 2017

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 :-)

@radujipa radujipa merged commit 2f62ced into master Feb 28, 2017
@radujipa radujipa deleted the extent-os-version branch February 28, 2017 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants