diff --git a/django_postgrespool/base.py b/django_postgrespool/base.py index 3545fff..7913c47 100644 --- a/django_postgrespool/base.py +++ b/django_postgrespool/base.py @@ -98,11 +98,13 @@ class DatabaseWrapper(Psycopg2DatabaseWrapper): def _commit(self): if self.connection is not None and self.connection.is_valid: - return self.connection.commit() + with self.wrap_database_errors: + return self.connection.commit() def _rollback(self): if self.connection is not None and self.connection.is_valid: - return self.connection.rollback() + with self.wrap_database_errors: + return self.connection.rollback() def _dispose(self): """Dispose of the pool for this instance, closing all connections.""" diff --git a/setup.py b/setup.py index 603b836..13ef11f 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ required = [ setup( name='django-postgrespool', - version='0.2.5', + version='0.2.6', description='Postgres Connection Pooling for Django.', long_description=open('README.rst').read(), author='Kenneth Reitz',