X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=modprobe.py;h=b56f5d5d984598958869c674d8b461615604050b;hb=89e957e8d10374704225ec04357a067aa350c4d6;hp=da311ff413aeb34ab07906f5dd1b31a4f7c25ccb;hpb=c69aa1b29cf0e2900681bbd892df2a260f0d491e;p=pyplnet.git diff --git a/modprobe.py b/modprobe.py index da311ff..b56f5d5 100644 --- a/modprobe.py +++ b/modprobe.py @@ -7,7 +7,7 @@ import os import tempfile -class Modprobe(): +class Modprobe: def __init__(self,filename="/etc/modprobe.conf"): self.conffile = {} self.origconffile = {} @@ -99,6 +99,7 @@ class Modprobe(): os.chmod(filename,0644) return True else: + os.unlink(tmpnam) return False def probe(self,name):