From 222dc1fe35eef27d981316343e405bf19fd11d72 Mon Sep 17 00:00:00 2001 From: Florian Bach Date: Thu, 28 Apr 2022 16:32:43 +0200 Subject: [PATCH] Fix error when fulfillment server hostname doesn't resolve --- calibre-plugin/libadobe.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/calibre-plugin/libadobe.py b/calibre-plugin/libadobe.py index 0e5dc39..7ec439a 100644 --- a/calibre-plugin/libadobe.py +++ b/calibre-plugin/libadobe.py @@ -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()