Merge "Change gnocchi_ext.NotFound to gnocchi_ext.ResourceTypeNotFound"

This commit is contained in:
Jenkins 2016-11-30 16:22:27 +00:00 committed by Gerrit Code Review
commit c0210dd0a2
2 changed files with 2 additions and 4 deletions

View File

@ -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)

View File

@ -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 =