Merge lp:~andrea.corbellini/ubuntu/raring/nvidia-common/detector-getData-fixes into lp:ubuntu/raring/nvidia-common

Proposed by Andrea Corbellini
Status: Needs review
Proposed branch: lp:~andrea.corbellini/ubuntu/raring/nvidia-common/detector-getData-fixes
Merge into: lp:ubuntu/raring/nvidia-common
Diff against target: 31 lines (+7/-3)
1 file modified
NvidiaDetector/nvidiadetector.py (+7/-3)
To merge this branch: bzr merge lp:~andrea.corbellini/ubuntu/raring/nvidia-common/detector-getData-fixes
Reviewer Review Type Date Requested Status
Alberto Milone Pending
Review via email: mp+130694@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

64. By Andrea Corbellini

Do not fail with an exception if an nvidia package name cannot be parsed.

63. By Andrea Corbellini

Do not detect experimental nvidia packages.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NvidiaDetector/nvidiadetector.py'
2--- NvidiaDetector/nvidiadetector.py 2011-08-12 17:33:04 +0000
3+++ NvidiaDetector/nvidiadetector.py 2012-10-21 09:15:25 +0000
4@@ -133,7 +133,8 @@
5
6 for package in apt.Cache():
7 if (not package.name.startswith('nvidia-')
8- or 'updates' in package.name):
9+ or 'updates' in package.name
10+ or 'experimental' in package.name):
11 continue
12 try:
13 m = package.candidate.record['Modaliases']
14@@ -146,7 +147,11 @@
15 # package names can be like "nvidia-173:i386" and we need to
16 # extract the driver flavour from the name e.g. "173"
17 stripped_package_name = package.name.split('-', 1)[1].split(':', 1)[0]
18- driver_version = self.__get_value_from_name(stripped_package_name)
19+ try:
20+ driver_version = self.__get_value_from_name(stripped_package_name)
21+ except ValueError:
22+ logging.error('Package name %s cannot be parsed' % package.name)
23+ continue
24
25 try:
26 for part in m.split(')'):
27@@ -439,4 +444,3 @@
28
29 #if __name__ == '__main__':
30 # main()
31-

Subscribers

People subscribed via source and target branches