Comment 3 for bug 1103647

Revision history for this message
Jeff Lane  (bladernr) wrote :

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.