import os
import tempfile
-class Modprobe():
+class Modprobe:
def __init__(self,filename="/etc/modprobe.conf"):
self.conffile = {}
self.origconffile = {}
- for keyword in ("alias","options","install","remove","blacklist","MODULES"):
+ for keyword in ("alias","options","install","remove","blacklist","MODULES","#"):
self.conffile[keyword]={}
self.filename = filename
table = self.conffile.get(command,None)
if table == None:
- print "WARNING: command %s not recognize. Ignoring!" % command
+ print "WARNING: command %s not recognized. Ignoring!" % command
continue
if command == "alias":
os.chmod(filename,0644)
return True
else:
+ os.unlink(tmpnam)
return False
def probe(self,name):