Merge lp:~bladernr/checkbox/1103647-lsmod_info-chokes-on-nvidia into lp:checkbox
Proposed by
Jeff Lane
Status: | Merged |
---|---|
Approved by: | Zygmunt Krynicki |
Approved revision: | 2099 |
Merged at revision: | 2099 |
Proposed branch: | lp:~bladernr/checkbox/1103647-lsmod_info-chokes-on-nvidia |
Merge into: | lp:checkbox |
Diff against target: |
38 lines (+8/-3) 2 files modified
debian/changelog (+2/-0) scripts/lsmod_info (+6/-3) |
To merge this branch: | bzr merge lp:~bladernr/checkbox/1103647-lsmod_info-chokes-on-nvidia |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Zygmunt Krynicki (community) | Approve | ||
Review via email: mp+162266@code.launchpad.net |
Description of the change
For some reason, we were trapping OSError instead of CalledProcessError when calling check_output(). This results in a traceback when running lsmod_info on a system with the nVidia proprietary driver installed.
So, to remedy this, we now trap CalledProcessError instead. If this is hit, if the retcode is 1, it's most likely due to a module not returning info:
$ modinfo nvidia
ERROR: Module nvidia not found.
If it's anything else, we raise the error because it's something more insidious that needs to be looked at.
To post a comment you must log in.
34 + raise e
Inside a exception capture block you can just use 'raise' to re-raise whatever is being currently captured