Change the image 404 to a flask_abort to avoid logging it
This commit is contained in:
parent
1af43735d0
commit
6d412c726b
1 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,7 @@ import logging
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from flask import (make_response, request, session, Response, redirect,
|
from flask import (make_response, request, session, Response, redirect,
|
||||||
Blueprint)
|
Blueprint, abort as flask_abort)
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from time import time
|
from time import time
|
||||||
|
@ -255,7 +255,7 @@ def get_image_json(namespace, repository, image_id, headers):
|
||||||
data = store.get_content(store.image_json_path(namespace, repository,
|
data = store.get_content(store.image_json_path(namespace, repository,
|
||||||
image_id))
|
image_id))
|
||||||
except IOError:
|
except IOError:
|
||||||
abort(404, 'Image %(image_id)%s not found', issue='unknown-image', image_id=image_id)
|
flask_abort(404)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
size = store.get_size(store.image_layer_path(namespace, repository,
|
size = store.get_size(store.image_layer_path(namespace, repository,
|
||||||
|
|
Reference in a new issue