Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Add cpu-microcode detect-plugin. #11
Conversation
|
May I upload this into ubuntu? |
martinpitt
reviewed
Feb 16, 2015
| + for line in file: | ||
| + if line.startswith('vendor_id'): | ||
| + cpu = line.split(':')[1].strip() | ||
| + return [db.get(cpu)] |
martinpitt
Feb 16, 2015
Collaborator
If the vendor is not in db, then this will return [None]. Would be better to do something like
try:
return [db[cpu]]
except KeyError:
break
?
xnox
Feb 19, 2015
Contributor
Yes that would be better. Also other plugins do not have return, or return None if nothing is detected. So that would work. Thanks for this. I'll land this now, to get into feature freeze =/ =)
|
Aside from that, it looks good to me, thanks! |
|
I somehow didn't know that returning None is redundant, as that is implied. |
|
Thanks! Merged. |
martinpitt
closed this
Feb 19, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
xnox commentedOct 30, 2014
Whitelist microcode packages for autoinstallation.
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1386257
Signed-off-by: Dimitri John Ledkov dimitri.j.ledkov@intel.com