Replace DbMigrationError with DBMigrationError

DbMigrationError is deprecated and will NOT be thrown in oslo.db
since oslo.db >=4.27.0, DBMigrationError will be thrown instead.
Consumers should catch DBMigrationError instead of DbMigrationError

Depends-On: Iab0566cf9f4552e91fa417e64472fa106e8bc86d
Depends-On: I0ebd69c3d778acb5bec9e136627e345e7fcf2bd3

Change-Id: I726edf35ccb11facf6ab53e403ee9d0d40435fae
This commit is contained in:
Yaguo Zhou 2017-09-05 22:49:18 +08:00
parent 37fc3f5f38
commit f7734842b0
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
pbr>=2.0.0,!=2.1.0
alembic>=0.8.10
oslo.config>=4.0.0
oslo.db>=4.24.0
oslo.db>=4.27.0
python-subunit>=0.0.18
six>=1.9.0
SQLAlchemy>=1.0.10,!=1.1.5,!=1.1.6,!=1.1.7,!=1.1.8

View File

@ -93,7 +93,7 @@ class TestWalkMigrations(base.TestCase):
revisions = list(script_dir.walk_revisions("base", "head"))
if not revisions:
raise exc.DbMigrationError('There is no suitable migrations.')
raise exc.DBMigrationError('There is no suitable migrations.')
for rev in list(reversed(revisions)):
# Destination, current