1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-25 02:57:22 +00:00

Update testresults

This commit is contained in:
Ozzie Isaacs 2022-03-15 18:44:36 +01:00
parent 8f3bb2e338
commit 399ddc5d6f
2 changed files with 217 additions and 553 deletions

View File

@ -738,16 +738,18 @@ def save_cover_from_url(url, book_path):
return save_cover(img, book_path) return save_cover(img, book_path)
except (socket.gaierror, except (socket.gaierror,
requests.exceptions.HTTPError, requests.exceptions.HTTPError,
requests.exceptions.InvalidURL,
requests.exceptions.ConnectionError, requests.exceptions.ConnectionError,
requests.exceptions.Timeout) as ex: requests.exceptions.Timeout) as ex:
log.info(u'Cover Download Error %s', ex) # "Invalid host" can be the result of a redirect response
log.error(u'Cover Download Error %s', ex)
return False, _("Error Downloading Cover") return False, _("Error Downloading Cover")
except MissingDelegateError as ex: except MissingDelegateError as ex:
log.info(u'File Format Error %s', ex) log.info(u'File Format Error %s', ex)
return False, _("Cover Format Error") return False, _("Cover Format Error")
except UnacceptableAddressException: except UnacceptableAddressException as e:
log.error("Localhost was accessed for cover upload") log.error("Localhost or local network was accessed for cover upload")
return False, _("You are not allowed to access localhost for cover uploads") return False, _("You are not allowed to access localhost or the local network for cover uploads")
def save_cover_from_filestorage(filepath, saved_filename, img): def save_cover_from_filestorage(filepath, saved_filename, img):

File diff suppressed because it is too large Load Diff