minor: fix indentation
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
parent
d0cb96781c
commit
cb6790b804
@ -56,7 +56,8 @@ class LocalStatusSQLiteFolder(BaseFolder):
|
|||||||
if not os.path.exists(dirname):
|
if not os.path.exists(dirname):
|
||||||
os.makedirs(dirname)
|
os.makedirs(dirname)
|
||||||
if not os.path.isdir(dirname):
|
if not os.path.isdir(dirname):
|
||||||
raise UserWarning("SQLite database path '%s' is not a directory." % dirname)
|
raise UserWarning("SQLite database path '%s' is not a directory."%
|
||||||
|
dirname)
|
||||||
|
|
||||||
# dblock protects against concurrent writes in same connection
|
# dblock protects against concurrent writes in same connection
|
||||||
self._dblock = Lock()
|
self._dblock = Lock()
|
||||||
@ -74,7 +75,8 @@ class LocalStatusSQLiteFolder(BaseFolder):
|
|||||||
|
|
||||||
#Test if db version is current enough and if db is readable.
|
#Test if db version is current enough and if db is readable.
|
||||||
try:
|
try:
|
||||||
cursor = self.connection.execute("SELECT value from metadata WHERE key='db_version'")
|
cursor = self.connection.execute(
|
||||||
|
"SELECT value from metadata WHERE key='db_version'")
|
||||||
except sqlite.DatabaseError:
|
except sqlite.DatabaseError:
|
||||||
#db file missing or corrupt, recreate it.
|
#db file missing or corrupt, recreate it.
|
||||||
self.__create_db()
|
self.__create_db()
|
||||||
|
Loading…
Reference in New Issue
Block a user