def cleanup(self):
if getattr(self._finalizer, "<STR_LIT>", None) and self._finalizer.detach():<EOL><INDENT>if os.path.exists(self.path):<EOL><INDENT>try:<EOL><INDENT>rmtree(self.path)<EOL><DEDENT>except OSError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>self.path = None<EOL><DEDENT><DEDENT><DEDENT>
Remove the temporary directory created and reset state