Skip to content

Commit 85adc53

Browse files
authored
Added comments
1 parent b35def0 commit 85adc53

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cs50/sql.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,15 @@ def execute(self, sql, *args, **kwargs):
215215
# Join tokens into statement
216216
statement = "".join([str(token) for token in tokens])
217217

218+
# Catch SQLAlchemy warnings
218219
with warnings.catch_warnings():
220+
221+
# Raise exceptions for warnings
219222
warnings.simplefilter("error")
220223

221224
# Prepare, execute statement
222225
try:
223226

224-
225227
# Execute statement
226228
result = self.engine.execute(sqlalchemy.text(statement))
227229

0 commit comments

Comments
 (0)