fix boot bug

This commit is contained in:
langolierz
2019-12-15 13:17:35 +00:00
parent e0b71cbc75
commit 9935f1a98b
2 changed files with 8 additions and 7 deletions

View File

@@ -831,8 +831,8 @@ class Actions(object):
current_conjur_hash = conjur_repo.head.object.hexsha
current_ofxVideoArtTools_hash = ofxVideoArtTools_repo.head.object.hexsha
self.try_remove_file(self.data.PATH_TO_DATA_OBJECTS + self.data.SETTINGS_JSON )
self.try_remove_file(self.data.PATH_TO_DEFAULT_CONJUR_DATA)
self.data.try_remove_file(self.data.PATH_TO_DATA_OBJECTS + self.data.SETTINGS_JSON )
self.data.try_remove_file(self.data.PATH_TO_DEFAULT_CONJUR_DATA)
try:
recur_repo.remotes.origin.pull()
conjur_repo.remotes.origin.pull()
@@ -869,7 +869,4 @@ class Actions(object):
self.message_handler.clear_all_messages()
@staticmethod
def try_remove_file(path):
if os.path.exists(path):
os.remove(path)

View File

@@ -57,7 +57,7 @@ class Data(object):
### persisted data (use default if doesnt exits):
if not os.path.isfile(self.PATH_TO_CONJUR_DATA):
os.remove(self.PATH_TO_DATA_OBJECTS + self.SETTINGS_JSON ) # keep the, in sync
self.try_remove_file(self.PATH_TO_DATA_OBJECTS + self.SETTINGS_JSON ) # keep the, in sync
copyfile(self.PATH_TO_DEFAULT_CONJUR_DATA, self.PATH_TO_CONJUR_DATA)
self.bank_data = [self.create_empty_bank()]
@@ -405,3 +405,7 @@ class Data(object):
else:
return []
@staticmethod
def try_remove_file(path):
if os.path.exists(path):
os.remove(path)