all instance attributes should be defined in constructor

This commit is contained in:
Mathieu Deous 2013-12-15 09:16:38 +01:00
parent 3effaee2a1
commit eda9a3da67

View File

@ -71,6 +71,8 @@ class Database(object):
def __init__(self, database=None):
self.database = self.filepath if database is None else database
self.connection = None
self.cursor = None
def connect(self, who="server"):
self.connection = sqlite3.connect(self.database, timeout=3, isolation_level=None)