示例#1
0
 def _load_hive(self, fname):
     # because hivex craps out with a bad file, but still tries to release in the
     # __del__ method, we first check here to see if it can all be loaded.
     try:
         h = libhivexmod.open(fname, 0)
         libhivexmod.close(h)
     except RuntimeError:
         raise IOError('Unable to load the registry hive "%s"!' % fname)
         sys.exit(2)
     return hivex.Hivex(fname)
示例#2
0
文件: hivex.py 项目: windwang/hivex
 def __del__ (self):
     libhivexmod.close (self._o)