Skip to content

Commit

Permalink
Check whether the file exists, do not report a bunch of exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
hleft committed Mar 19, 2023
1 parent 79b2d67 commit e0aef6f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions book_maker/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ def main():
)

options = parser.parse_args()

if not os.path.isfile(options.book_name):
print(f"Error: {options.book_name} does not exist.")
exit(1)

PROXY = options.proxy
if PROXY != "":
os.environ["http_proxy"] = PROXY
Expand Down

0 comments on commit e0aef6f

Please sign in to comment.