Skip to content
Snippets Groups Projects
Commit 40de8abd authored by Bartek Wrona's avatar Bartek Wrona
Browse files

Merge branch 'pbatko/fix-race-condition' into 'master'

Remove race condition during creation of directory for SQLiteFile

See merge request !7
parents a02405ca 79156254
No related branches found
No related tags found
1 merge request!7Remove race condition during creation of directory for SQLiteFile
......@@ -50,13 +50,8 @@ class SQLiteFile:
self.sqlite_file = os.path.join(self.data_dir, self.storageDatabase)
""" Ensure that the directory in which the data is stored
exists
"""
if os.path.isdir(self.data_dir): # pragma: no cover
return
else: # pragma: no cover
os.makedirs(self.data_dir)
# Ensure that the directory in which the data is stored exists
os.makedirs(self.data_dir, exist_ok=True)
def sqlite3_backup(self, backupdir):
""" Create timestamped database copy
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment