diff --git a/DBUtils/SteadyDB.py b/DBUtils/SteadyDB.py index e1465d1..0685bcc 100644 --- a/DBUtils/SteadyDB.py +++ b/DBUtils/SteadyDB.py @@ -548,6 +548,13 @@ def _setsizes(self, cursor=None): else: cursor.setoutputsize(size, column) + def __enter__(self): + return self + + def __exit__(self, *exc_info): + del exc_info + self.close() + def close(self): """Close the tough cursor. diff --git a/setup.py b/setup.py index 5159a86..0b8f4e3 100755 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from sys import version_info -__version__ = '1.2' +__version__ = '1.2.1' py_version = version_info[:2] if py_version < (2, 6):