Fix crash if preset flag is not set
This commit is contained in:
1 parent
ae0f204828
commit
fb2479c65d
2 files changed
+6
-5
No files matched your search
@@ -33,10 +33,11 @@ if __name__ == '__main__' :
|
||||
presetContent = ''
|
||||
presetFile = Path().cwd().joinpath(f"{config['presetPath']}/{args.file_preset}.py")
|
||||
|
||||
if not presetFile.exists() and args.file_preset == '' :
|
||||
raise Exception(f"Preset {args.file_preset} does not exist!")
|
||||
else :
|
||||
presetContent = presetFile.read_text()
|
||||
if args.file_preset != '' :
|
||||
if not presetFile.exists() :
|
||||
raise Exception(f"Preset {args.file_preset} does not exist!")
|
||||
else :
|
||||
presetContent = presetFile.read_text()
|
||||
|
||||
if not args.path :
|
||||
path = Path().cwd()
|
||||
|
||||
Reference in new issue
Block a user