diff options
Diffstat (limited to 'Doc/includes/sqlite3/ctx_manager.py')
-rw-r--r-- | Doc/includes/sqlite3/ctx_manager.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Doc/includes/sqlite3/ctx_manager.py b/Doc/includes/sqlite3/ctx_manager.py index 6db77d4..d6f27e6 100644 --- a/Doc/includes/sqlite3/ctx_manager.py +++ b/Doc/includes/sqlite3/ctx_manager.py @@ -13,8 +13,4 @@ try: with con: con.execute("insert into person(firstname) values (?)", ("Joe",)) except sqlite3.IntegrityError: - print("couldn't add Joe twice") - -# Connection object used as context manager only commits or rollbacks transactions, -# so the connection object should be closed manually -con.close() + print "couldn't add Joe twice" |