Fix exception in storage replication worker

Fixes https://jira.coreos.com/browse/QUAY-957
This commit is contained in:
Joseph Schorr 2018-05-31 13:58:04 -04:00
parent 86929c16d3
commit 52ddf6a308

View file

@ -43,8 +43,9 @@ class StorageReplicationWorker(QueueWorker):
locations = model.user.get_region_locations(namespace)
# Lookup the image storage.
partial_storage = model.storage.get_storage_by_uuid(storage_uuid)
if not partial_storage:
try:
partial_storage = model.storage.get_storage_by_uuid(storage_uuid)
except model.InvalidImageException:
logger.debug('Unknown storage: %s', storage_uuid)
return True