3 Commits
Author SHA1 Message Date
kairoto fcee240869 Renamed the default dir correctly 2026-09-19 22:24:12 +02:00
kairoto fb2479c65d Fix crash if preset flag is not set 2026-09-19 22:23:32 +02:00
kairoto ae0f204828 Fix loading custom presets 2026-09-19 22:19:55 +02:00
+6 -5
View File
@@ -11,7 +11,7 @@ if __name__ == '__main__' :
configFile = open("config.json",'r') configFile = open("config.json",'r')
config = json.loads(configFile.readall()) config = json.loads(configFile.read())
configFile.close() configFile.close()
@@ -33,10 +33,11 @@ if __name__ == '__main__' :
presetContent = '' presetContent = ''
presetFile = Path().cwd().joinpath(f"{config['presetPath']}/{args.file_preset}.py") presetFile = Path().cwd().joinpath(f"{config['presetPath']}/{args.file_preset}.py")
if not presetFile.exists() and args.file_preset == '' : if args.file_preset != '' :
raise Exception(f"Preset {args.file_preset} does not exist!") if not presetFile.exists() :
else : raise Exception(f"Preset {args.file_preset} does not exist!")
presetContent = presetFile.read_text() else :
presetContent = presetFile.read_text()
if not args.path : if not args.path :
path = Path().cwd() path = Path().cwd()