X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=debug%2Flibb43.py;h=cb2cf576dadfef981d628145375c64096cf03b91;hb=fc024e3b2276519d9d43923ee04debbacc2dea2f;hp=671ad2c6f173a141bb2bbffa984c6200f5c929e4;hpb=98a28c2cd91e0bc78c9420b6b78be81993fe969a;p=b43-tools.git diff --git a/debug/libb43.py b/debug/libb43.py index 671ad2c..cb2cf57 100644 --- a/debug/libb43.py +++ b/debug/libb43.py @@ -19,7 +19,7 @@ import sys import os import re -import md5 +import hashlib from tempfile import * @@ -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 @@ -339,7 +343,7 @@ class TextPatcher: self.deleted = False def __init__(self, text, expected_md5sum): - sum = md5.md5(text).hexdigest() + sum = hashlib.md5(text).hexdigest() if sum != expected_md5sum: print "Patcher: The text does not match the expected MD5 sum" print "Expected: " + expected_md5sum