From 64d57ea2a3b8561aed9220711442c9181968dbfd Mon Sep 17 00:00:00 2001 From: dtlnor Date: Mon, 16 Jan 2023 14:45:47 +0900 Subject: [PATCH] add prompt when there is no valid input file --- main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.py b/main.py index 7b0b3c7..f28d8bb 100644 --- a/main.py +++ b/main.py @@ -208,6 +208,10 @@ def main(): print(f"{name}.{args.mode} not found, skiping this file...") filenameList.remove(file) + if len(filenameList) <= 0: + print(f"No valid input file, exiting.") + sys.exit(1) + if editMode and (len(editList) <= 0 or None in editList): print(f"{args.mode} mode with edit file/folder input but no {args.mode} file found.") sys.exit(1)