Fix nova-compute use of missing DBError

Apparently exception.DBError disappeared at some point, but nova-
compute was still using it. Since it was a stretch in the first
place, and nothing else in exception.py looks reasonable, this
adds exception.DBNotAllowed.

Fixes bug 1120390

Change-Id: Ifbfa0b09f3dc011ad87f6f3b06eb0fdaa7247ec0
This commit is contained in:
Dan Smith
2013-02-09 09:51:40 -05:00
parent a1aaa5dd26
commit e2ca524ed8

View File

@@ -64,7 +64,7 @@ def block_db_access():
def __call__(self, *args, **kwargs):
stacktrace = "".join(traceback.format_stack())
LOG.error('No db access allowed in nova-compute: %s' % stacktrace)
raise exception.DBError('No db access allowed in nova-compute')
raise exception.DBNotAllowed('nova-compute')
nova.db.api.IMPL = NoDB()