Log info, not exception, for expected errors

This commit is contained in:
Mouse Reeve
2022-03-11 14:31:04 -08:00
parent e0ffcddd3c
commit 72d6a4ce52
3 changed files with 10 additions and 10 deletions

View File

@ -19,11 +19,11 @@ def download_file(url, destination):
with open(destination, "b+w") as outfile:
outfile.write(stream.read())
except (urllib.error.HTTPError, urllib.error.URLError):
logger.error("Failed to download file %s", url)
logger.info("Failed to download file %s", url)
except OSError:
logger.error("Couldn't open font file %s for writing", destination)
logger.info("Couldn't open font file %s for writing", destination)
except: # pylint: disable=bare-except
logger.exception("Unknown error in file download")
logger.info("Unknown error in file download")
class BookwyrmConfig(AppConfig):