def __exit__(self, exc_type, exc_val, exc_tb):
try:<EOL><INDENT>if exc_type is None and self.autoexec:<EOL><INDENT>self.execute()<EOL><DEDENT><DEDENT>finally:<EOL><INDENT>self.reset()<EOL>cb = self._exit_handler<EOL>if cb:<EOL><INDENT>cb()<EOL><DEDENT><DEDENT>
context manager cleanup method.
:param exc_type:
:param exc_val:
:param exc_tb:
:return: