Example #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)
Example #2
0
 def __del__ (self):
     libhivexmod.close (self._o)