From 52ddf6a30855a4831531c04b46f571b1bc343651 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 31 May 2018 13:58:04 -0400 Subject: [PATCH] Fix exception in storage replication worker Fixes https://jira.coreos.com/browse/QUAY-957 --- workers/storagereplication.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/workers/storagereplication.py b/workers/storagereplication.py index 9eb3a9bd9..56bf0cf2b 100644 --- a/workers/storagereplication.py +++ b/workers/storagereplication.py @@ -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