def cleanup(self, name): self.rootdir = name try: chroot.cleanup_mounts(self.rootdir) shutil.rmtree(self.rootdir, ignore_errors=True) except: raise errors.BootstrapError("Bootstrap: %s clean up fail " % self.rootdir)
def cleanup(self): try: # clean mounts cleanup_mounts(self.rootdir) # remove rootdir shutil.rmtree(self.rootdir, ignore_errors=True) except: pass