mirror of
https://github.com/Leseratte10/acsm-calibre-plugin
synced 2024-12-26 09:58:09 +01:00
Don't fail if optional notification server is unavailable
This commit is contained in:
parent
964d4c06eb
commit
3daed133e0
1 changed files with 12 additions and 1 deletions
|
@ -706,7 +706,18 @@ def performFulfillmentNotification(fulfillmentResultToken, forceOptional = False
|
||||||
# Debug: Print notify request
|
# Debug: Print notify request
|
||||||
#print(doc_send)
|
#print(doc_send)
|
||||||
|
|
||||||
code, msg = sendRequestDocuRC(doc_send, url)
|
try:
|
||||||
|
code, msg = sendRequestDocuRC(doc_send, url)
|
||||||
|
except:
|
||||||
|
if not critical:
|
||||||
|
print("There was an error during an optional fulfillment notification:")
|
||||||
|
import traceback
|
||||||
|
traceback.print_exc()
|
||||||
|
print("Continuing execution ...")
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
print("Error during critical notification:")
|
||||||
|
raise
|
||||||
|
|
||||||
try:
|
try:
|
||||||
msg = msg.decode("utf-8")
|
msg = msg.decode("utf-8")
|
||||||
|
|
Loading…
Reference in a new issue