Bootstrapper use python date functions instead of sqlite

This commit is contained in:
shortcutme 2017-08-18 14:43:28 +02:00
parent f1c320dd22
commit 9f762a0230
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 12 additions and 5 deletions

View file

@ -163,8 +163,13 @@ class SiteStorage(object):
return res
# Open file object
def open(self, inner_path, mode="rb"):
return open(self.getPath(inner_path), mode)
def open(self, inner_path, mode="rb", create_dirs=False):
file_path = self.getPath(inner_path)
if create_dirs:
file_dir = os.path.dirname(file_path)
if not os.path.isdir(file_dir):
os.makedirs(file_dir)
return open(file_path, mode)
# Open file object
def read(self, inner_path, mode="r"):