Fix up log lines
This commit is contained in:
parent
9795b9ebb1
commit
307f88dfb6
|
@ -285,7 +285,7 @@ class MediaRepository(object):
|
|||
# If we have an entry in the DB, try and look for it
|
||||
if media_info:
|
||||
if media_info["quarantined_by"]:
|
||||
logger.info("Media is quarentined")
|
||||
logger.info("Media is quarantined")
|
||||
raise NotFoundError()
|
||||
|
||||
responder = yield self.media_storage.fetch_media(file_info)
|
||||
|
|
|
@ -85,7 +85,9 @@ class ThumbnailResource(Resource):
|
|||
media_info = yield self.store.get_local_media(media_id)
|
||||
|
||||
if not media_info or media_info["quarantined_by"]:
|
||||
logger.info("Media is quarantined")
|
||||
if media_info:
|
||||
logger.info("Media is quarantined")
|
||||
|
||||
respond_404(request)
|
||||
return
|
||||
|
||||
|
@ -122,7 +124,8 @@ class ThumbnailResource(Resource):
|
|||
media_info = yield self.store.get_local_media(media_id)
|
||||
|
||||
if not media_info or media_info["quarantined_by"]:
|
||||
logger.info("Media is quarantined")
|
||||
if media_info["quarantined_by"]:
|
||||
logger.info("Media is quarantined")
|
||||
respond_404(request)
|
||||
return
|
||||
|
||||
|
@ -152,7 +155,7 @@ class ThumbnailResource(Resource):
|
|||
yield respond_with_responder(request, responder, t_type, t_length)
|
||||
return
|
||||
|
||||
logger.debug("We don't have a local thumbnail of that size. Generating")
|
||||
logger.debug("We don't have a thumbnail of that size. Generating")
|
||||
|
||||
# Okay, so we generate one.
|
||||
file_path = yield self.media_repo.generate_local_exact_thumbnail(
|
||||
|
@ -162,7 +165,7 @@ class ThumbnailResource(Resource):
|
|||
if file_path:
|
||||
yield respond_with_file(request, desired_type, file_path)
|
||||
else:
|
||||
logger.warn("Failed to generate local thumbnail")
|
||||
logger.warn("Failed to generate thumbnail")
|
||||
respond_404(request)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
|
@ -201,7 +204,7 @@ class ThumbnailResource(Resource):
|
|||
yield respond_with_responder(request, responder, t_type, t_length)
|
||||
return
|
||||
|
||||
logger.debug("We don't have a remote thumbnail of that size. Generating")
|
||||
logger.debug("We don't have a thumbnail of that size. Generating")
|
||||
|
||||
# Okay, so we generate one.
|
||||
file_path = yield self.media_repo.generate_remote_exact_thumbnail(
|
||||
|
@ -212,7 +215,7 @@ class ThumbnailResource(Resource):
|
|||
if file_path:
|
||||
yield respond_with_file(request, desired_type, file_path)
|
||||
else:
|
||||
logger.warn("Failed to generate remote thumbnail")
|
||||
logger.warn("Failed to generate thumbnail")
|
||||
respond_404(request)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
|
|
Loading…
Reference in New Issue