From 26d569dee5d9943dd12c1b54f7a9256159f22225 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 5 Sep 2022 20:19:54 +0900 Subject: Remove unnecessary logic for missing oslo.cache The oslo.cache library is now included in the requirements thus should be always installed. This change removes the logic to handle missing oslo.cache. Change-Id: I1cc09aa0db5f19e913030b528c51052fd4ef331d --- ceilometer/publisher/gnocchi.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'ceilometer') diff --git a/ceilometer/publisher/gnocchi.py b/ceilometer/publisher/gnocchi.py index 19d7d54b..27e499f5 100644 --- a/ceilometer/publisher/gnocchi.py +++ b/ceilometer/publisher/gnocchi.py @@ -24,6 +24,7 @@ import uuid from gnocchiclient import exceptions as gnocchi_exc from keystoneauth1 import exceptions as ka_exceptions +import oslo_cache from oslo_log import log from oslo_utils import timeutils from stevedore import extension @@ -214,7 +215,6 @@ class GnocchiPublisher(publisher.ConfigPublisherBase): self.cache = None try: - import oslo_cache oslo_cache.configure(conf) # NOTE(cdent): The default cache backend is a real but # noop backend. We don't want to use that here because @@ -225,8 +225,6 @@ class GnocchiPublisher(publisher.ConfigPublisherBase): self.cache = oslo_cache.configure_cache_region( conf, cache_region) self.cache.key_mangler = cache_key_mangler - except ImportError: - pass except oslo_cache.exception.ConfigurationError as exc: LOG.warning('unable to configure oslo_cache: %s', exc) -- cgit v1.2.1