Skip to content

Commit 7083b80

Browse files
committed
fix github webhook issue
1 parent c0bca45 commit 7083b80

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/pyinfraboxutils/db.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,15 @@ def execute_one(self, stmt, args=None):
3333

3434
def execute_many(self, stmt, args=None):
3535
c = self.conn.cursor(cursor_factory=psycopg2.extras.DictCursor)
36-
c.execute(stmt, args)
37-
r = c.fetchall()
38-
c.close()
36+
try:
37+
self.validate_args(args)
38+
c.execute(stmt, args)
39+
r = c.fetchall()
40+
except psycopg2.Error as e:
41+
logger.exception("Database error: %s", e)
42+
raise
43+
finally:
44+
c.close()
3945
return r
4046

4147
def execute_one_dict(self, stmt, args=None):

0 commit comments

Comments
 (0)