diff --git a/ceilometer/gnocchi_client.py b/ceilometer/gnocchi_client.py index 956445a4..5703419f 100644 --- a/ceilometer/gnocchi_client.py +++ b/ceilometer/gnocchi_client.py @@ -103,9 +103,7 @@ def upgrade_resource_types(conf): for name, attributes in resources_initial.items(): try: gnocchi.resource_type.get(name=name) - except gnocchi_exc.NotFound: - # FIXME(sileht): It should be ResourceTypeNotFound but - # gnocchiclient doesn't raise that :( + except gnocchi_exc.ResourceTypeNotFound: rt = {'name': name, 'attributes': attributes} try: gnocchi.resource_type.create(resource_type=rt) diff --git a/setup.cfg b/setup.cfg index 1185980e..4315c5cc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -33,7 +33,7 @@ data_files = [extras] gnocchi = - gnocchiclient>=2.2.0 # Apache-2.0 + gnocchiclient>=2.7.0 # Apache-2.0 mongo = pymongo!=3.1,>=3.0.2 # Apache-2.0 postgresql =