Merge "Run migration with NotFound exception as well" into stable/ussuri

This commit is contained in:
Zuul 2020-08-21 10:59:45 +00:00 committed by Gerrit Code Review
commit e6809e1236
1 changed files with 1 additions and 1 deletions

View File

@ -264,7 +264,7 @@ def upgrade_resource_types(conf):
for name, attributes in resources_initial.items():
try:
gnocchi.resource_type.get(name=name)
except gnocchi_exc.ResourceTypeNotFound:
except (gnocchi_exc.ResourceTypeNotFound, gnocchi_exc.NotFound):
rt = {'name': name, 'attributes': attributes}
gnocchi.resource_type.create(resource_type=rt)