Skip to content

Commit

Permalink
adding file not found check
Browse files Browse the repository at this point in the history
  • Loading branch information
vinissou committed Oct 3, 2024
1 parent ced53b0 commit 206cbaf
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pdf_page_size_fixer.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ def main():
if args.options:
messages.options()

src = fitz.Document(args.file)
doc = fitz.Document()
out = src.name
if args.file:
src = fitz.Document(args.file)
doc = fitz.Document()
out = src.name
else:
raise FileNotFoundError("\n\n \033[31m Input file not provided \033[0m \n")

print("\n FILE:", out)

Expand Down

0 comments on commit 206cbaf

Please sign in to comment.