Skip to content

Commit

Permalink
add prompt when there is no valid input file
Browse files Browse the repository at this point in the history
  • Loading branch information
dtlnor committed Jan 16, 2023
1 parent d1786a6 commit 64d57ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 64d57ea

Please sign in to comment.