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