diff options
Diffstat (limited to 'gn_libs/mysqldb.py')
-rw-r--r-- | gn_libs/mysqldb.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gn_libs/mysqldb.py b/gn_libs/mysqldb.py index 11302a2..be21550 100644 --- a/gn_libs/mysqldb.py +++ b/gn_libs/mysqldb.py @@ -87,11 +87,11 @@ def database_connection(sql_uri: str, logger: logging.Logger = _logger) -> Itera connection = mdb.connect(**parse_db_url(sql_uri)) try: yield connection + connection.commit() except mdb.Error as _mbde: logger.error("DB error encountered", exc_info=True) connection.rollback() finally: - connection.commit() connection.close() |