From f7734842b06711c140cf58dbf6c1b317b7f9c008 Mon Sep 17 00:00:00 2001 From: Yaguo Zhou Date: Tue, 5 Sep 2017 22:49:18 +0800 Subject: [PATCH] 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 --- requirements.txt | 2 +- subunit2sql/tests/migrations/test_migrations.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index c86db38..d64a70e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/subunit2sql/tests/migrations/test_migrations.py b/subunit2sql/tests/migrations/test_migrations.py index 55d1d2e..483d0aa 100644 --- a/subunit2sql/tests/migrations/test_migrations.py +++ b/subunit2sql/tests/migrations/test_migrations.py @@ -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