|
@@ -1,6 +1,7 @@
|
|
from glob import glob
|
|
from glob import glob
|
|
from json import load, dump
|
|
from json import load, dump
|
|
from os import path, mkdir
|
|
from os import path, mkdir
|
|
|
|
+from os.path import exists
|
|
from shutil import rmtree, copytree
|
|
from shutil import rmtree, copytree
|
|
from time import time
|
|
from time import time
|
|
from uuid import uuid1
|
|
from uuid import uuid1
|
|
@@ -12,9 +13,12 @@ from pycs.projects.Project import Project
|
|
|
|
|
|
class ProjectManager(ObservableDict):
|
|
class ProjectManager(ObservableDict):
|
|
def __init__(self, app_status: ApplicationStatus):
|
|
def __init__(self, app_status: ApplicationStatus):
|
|
- # TODO create projects folder if it does not exist
|
|
|
|
self.app_status = app_status
|
|
self.app_status = app_status
|
|
|
|
|
|
|
|
+ # create projects folder if it does not exist
|
|
|
|
+ if not exists('projects/'):
|
|
|
|
+ mkdir('projects/')
|
|
|
|
+
|
|
# initialize observable dict with no keys and
|
|
# initialize observable dict with no keys and
|
|
# app_status object as parent
|
|
# app_status object as parent
|
|
super().__init__({}, app_status)
|
|
super().__init__({}, app_status)
|