mirror of
https://github.com/Leseratte10/acsm-calibre-plugin.git
synced 2024-11-16 11:46:10 +06:00
Fix error when fulfillment server hostname doesn't resolve
This commit is contained in:
parent
5fe4dbb75a
commit
222dc1fe35
|
@ -326,6 +326,10 @@ def sendPOSTHTTPRequest(URL, document, type, returnRC = False):
|
|||
# This happens with HTTP 500 and related errors.
|
||||
print("Post request caused HTTPError %d" % (err.code))
|
||||
return err.code, "Post request caused HTTPException"
|
||||
except uliberror.URLError as err:
|
||||
# This happens if the hostname cannot be resolved.
|
||||
print("Post request failed with URLError")
|
||||
return 900, "Post request failed with URLError"
|
||||
|
||||
|
||||
ret_code = handler.getcode()
|
||||
|
|
Loading…
Reference in New Issue
Block a user