Sfoglia il codice sorgente

Fix db_helper: fix typo and re-throw exception

StrayWarrior 7 mesi fa
parent
commit
7402f96eb9
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      db_helper.py

+ 2 - 1
db_helper.py

@@ -385,7 +385,8 @@ class MysqlHelper(object):
                 conn.commit()
         except pymysql.MySQLError as e:
             print(f"Error in batch_insert: {e}")
-            connection.rollback()
+            conn.rollback()
+            raise e
         conn.close()