mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-05 16:00:06 +01:00
fix boot bug
This commit is contained in:
@@ -831,8 +831,8 @@ class Actions(object):
|
|||||||
current_conjur_hash = conjur_repo.head.object.hexsha
|
current_conjur_hash = conjur_repo.head.object.hexsha
|
||||||
current_ofxVideoArtTools_hash = ofxVideoArtTools_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.data.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_DEFAULT_CONJUR_DATA)
|
||||||
try:
|
try:
|
||||||
recur_repo.remotes.origin.pull()
|
recur_repo.remotes.origin.pull()
|
||||||
conjur_repo.remotes.origin.pull()
|
conjur_repo.remotes.origin.pull()
|
||||||
@@ -869,7 +869,4 @@ class Actions(object):
|
|||||||
self.message_handler.clear_all_messages()
|
self.message_handler.clear_all_messages()
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def try_remove_file(path):
|
|
||||||
if os.path.exists(path):
|
|
||||||
os.remove(path)
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class Data(object):
|
|||||||
|
|
||||||
### persisted data (use default if doesnt exits):
|
### persisted data (use default if doesnt exits):
|
||||||
if not os.path.isfile(self.PATH_TO_CONJUR_DATA):
|
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)
|
copyfile(self.PATH_TO_DEFAULT_CONJUR_DATA, self.PATH_TO_CONJUR_DATA)
|
||||||
|
|
||||||
self.bank_data = [self.create_empty_bank()]
|
self.bank_data = [self.create_empty_bank()]
|
||||||
@@ -405,3 +405,7 @@ class Data(object):
|
|||||||
else:
|
else:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def try_remove_file(path):
|
||||||
|
if os.path.exists(path):
|
||||||
|
os.remove(path)
|
||||||
|
|||||||
Reference in New Issue
Block a user