Skip to content

Commit 01236bc

Browse files
committed
import sys module, tweaked styles
1 parent bd25298 commit 01236bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cs50/sql.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
import threading
23

34
# Thread-local data
@@ -74,7 +75,7 @@ def __init__(self, url, **kwargs):
7475
def connect(dbapi_connection, connection_record):
7576

7677
# Enable foreign key constraints
77-
if 'sqlite3' in sys.modules and type(dbapi_connection) is sqlite3.Connection: # If back end is sqlite
78+
if "sqlite3" in sys.modules and type(dbapi_connection) is sqlite3.Connection: # If back end is sqlite
7879
cursor = dbapi_connection.cursor()
7980
cursor.execute("PRAGMA foreign_keys=ON")
8081
cursor.close()

0 commit comments

Comments
 (0)