adapt to new DF init paths

develop
Myk Taylor 2023-08-03 04:55:31 -07:00
parent 27b5d1e022
commit 556c1eff92
No known key found for this signature in database
1 changed files with 12 additions and 1 deletions

@ -55,7 +55,18 @@ if os.path.exists(test_status_file):
os.remove(test_status_file)
print('Backing up init.txt to init.txt.orig')
init_txt_path = 'data/init/init.txt'
default_init_txt_path = 'data/init/init_default.txt'
prefs_path = 'prefs'
init_txt_path = 'prefs/init.txt'
if not os.path.exists(init_txt_path):
try:
os.mkdir(prefs_path)
except OSError as error:
# ignore already exists errors
pass
shutil.copyfile(default_init_txt_path, init_txt_path)
print('Backing up init.txt to init.txt.orig')
shutil.copyfile(init_txt_path, init_txt_path + '.orig')
with open(init_txt_path) as f:
init_contents = f.read()