diff --git a/config.json b/config.json index 102c6c0..3f7a825 100644 --- a/config.json +++ b/config.json @@ -1,5 +1,5 @@ { - "defaultDirectoryName":"NewProject", + "defaultDirectoryName":"NP", "defaultFileName":"main.py", "defaultPreset":"", "presetPath":"./presets" diff --git a/lpp.py b/lpp.py index 53244fa..5fc85ac 100644 --- a/lpp.py +++ b/lpp.py @@ -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()