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)
except (socket.gaierror,
requests.exceptions.HTTPError,
requests.exceptions.InvalidURL,
requests.exceptions.ConnectionError,
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")
except MissingDelegateError as ex:
log.info(u'File Format Error %s', ex)
return False, _("Cover Format Error")
except UnacceptableAddressException:
log.error("Localhost was accessed for cover upload")
return False, _("You are not allowed to access localhost for cover uploads")
except UnacceptableAddressException as e:
log.error("Localhost or local network was accessed for cover upload")
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):

File diff suppressed because it is too large Load Diff