From 64d8410977e401f693325f23e37cf8b35089a853 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 16 Nov 2017 18:03:51 -0800 Subject: [PATCH] No need for self.cur, just cur. --- etiquette/photodb.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/etiquette/photodb.py b/etiquette/photodb.py index 631d87f..64acb42 100644 --- a/etiquette/photodb.py +++ b/etiquette/photodb.py @@ -1124,17 +1124,17 @@ class PhotoDB(PDBAlbumMixin, PDBBookmarkMixin, PDBPhotoMixin, PDBTagMixin, PDBUs existing_database = self.database_file.exists self.sql = sqlite3.connect(self.database_file.absolute_path) - self.cur = self.sql.cursor() + cur = self.sql.cursor() if existing_database: - self.cur.execute('PRAGMA user_version') - existing_version = self.cur.fetchone()[0] + cur.execute('PRAGMA user_version') + existing_version = cur.fetchone()[0] if existing_version != DATABASE_VERSION: raise exceptions.DatabaseOutOfDate(current=existing_version, new=DATABASE_VERSION) statements = DB_INIT.split(';') for statement in statements: - self.cur.execute(statement) + cur.execute(statement) self.sql.commit() # CONFIG