mirror of
https://github.com/yihong0618/bilingual_book_maker.git
synced 2025-06-05 19:15:34 +00:00
Check whether the file exists, do not report a bunch of exceptions
This commit is contained in:
parent
79b2d67cc9
commit
e0aef6f8af
@ -190,6 +190,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 os.path.isfile(options.book_name):
|
||||||
|
print(f"Error: {options.book_name} does not exist.")
|
||||||
|
exit(1)
|
||||||
|
|
||||||
PROXY = options.proxy
|
PROXY = options.proxy
|
||||||
if PROXY != "":
|
if PROXY != "":
|
||||||
os.environ["http_proxy"] = PROXY
|
os.environ["http_proxy"] = PROXY
|
||||||
|
Loading…
x
Reference in New Issue
Block a user