From: Michael Buesch Date: Wed, 23 Jul 2008 22:36:58 +0000 (+0200) Subject: Fix crash if b43 is not loaded. X-Git-Tag: b43-fwcutter-013~22 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=29d379ca5d8011793052099783fd4bd70b4a368f;p=b43-tools.git Fix crash if b43 is not loaded. Signed-off-by: Michael Buesch --- diff --git a/debug/libb43.py b/debug/libb43.py index 671ad2c..e5c5638 100644 --- a/debug/libb43.py +++ b/debug/libb43.py @@ -71,7 +71,11 @@ class B43: b43_path += phy else: # Get the PHY. - phys = os.listdir(b43_path) + try: + phys = os.listdir(b43_path) + except OSError: + print "Could not find B43's debugfs directory: %s" % b43_path + raise B43Exception if not phys: print "Could not find any b43 device" raise B43Exception