credopts, versionopts)
try:
+ if tmpdir is None:
+ # Create GPT
+ self.tmpdir, gpodir = self.construct_tmpdir(tmpdir, self.gpo_name)
+ self.gpodir = gpodir
+
# Iterate over backup files and restore with DTD
self.restore_from_backup_to_local_dir(backup, self.gpodir,
dtd_header)
self.samdb.modify(m)
+ if tmpdir is None:
+ # Without --tmpdir, we created one in /tmp/. It must go.
+ shutil.rmtree(self.tmpdir)
+
except Exception as e:
import traceback
traceback.print_exc()