diff options
author | fengchaoyang <fengchaoyang@unitedstack.com> | 2016-11-30 10:56:17 +0800 |
---|---|---|
committer | fengchaoyang <fengchaoyang@unitedstack.com> | 2016-11-30 20:03:12 +0800 |
commit | 6c90b469c0274d365b5f6caeb88b536e2a835991 (patch) | |
tree | 15a1a994052e4a3a02bd9a28c86bc5324d50f929 /ceilometer/gnocchi_client.py | |
parent | db43971d5310eef1cca2b135d1a7f8066473c6e8 (diff) | |
download | ceilometer-6c90b469c0274d365b5f6caeb88b536e2a835991.tar.gz |
Change gnocchi_ext.NotFound to gnocchi_ext.ResourceTypeNotFound
Makes the exception locator more specific.
Change-Id: Ia2fd73666f9da9ac132f7408996defe92a677cc0
Diffstat (limited to 'ceilometer/gnocchi_client.py')
-rw-r--r-- | ceilometer/gnocchi_client.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ceilometer/gnocchi_client.py b/ceilometer/gnocchi_client.py index 1e3deabe..13c459c8 100644 --- a/ceilometer/gnocchi_client.py +++ b/ceilometer/gnocchi_client.py @@ -105,9 +105,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) |