check_output() raises a CalledProcessError  if cmd returns anything but
0.  Not sure why we're trapping OSError instead, I can't find anything
that indicates check_output() will ever raise OSError.

Simple enough to change the error handling.  We'll trap
CalledProcessError.  If it's anything but a 1, there's likely something
else going on, so we want to raise that.  But a 1 is usually indicative
of "Module $FOO not found" as shown above.  So for those, we'll just
pass 'Unavailable' back.

** Changed in: checkbox (Ubuntu)
       Status: Triaged => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1103647

Title:
  lsmod_info crashed with subprocess.CalledProcessError in
  check_output(): Command '['/sbin/modinfo', 'nvidia']' returned non-
  zero exit status 1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/checkbox/+bug/1103647/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to