mirror of
https://github.com/yihong0618/bilingual_book_maker.git
synced 2025-06-06 11:35:49 +00:00
Avoid crash if not provide book_name
This commit is contained in:
parent
9261d92e20
commit
45be57da2a
@ -325,8 +325,11 @@ So you are close to reaching the limit. You have to choose your own value, there
|
|||||||
|
|
||||||
options = parser.parse_args()
|
options = parser.parse_args()
|
||||||
|
|
||||||
|
if not options.book_name:
|
||||||
|
print(f"Error: please provide the path of your book using --book_name <path>")
|
||||||
|
exit(1)
|
||||||
if not os.path.isfile(options.book_name):
|
if not os.path.isfile(options.book_name):
|
||||||
print(f"Error: {options.book_name} does not exist.")
|
print(f"Error: the book {options.book_name!r} does not exist.")
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
PROXY = options.proxy
|
PROXY = options.proxy
|
||||||
|
Loading…
x
Reference in New Issue
Block a user