summaryrefslogtreecommitdiff
path: root/oslo_db/sqlalchemy/utils.py
diff options
context:
space:
mode:
authorJulien Danjou <julien@danjou.info>2016-08-30 17:45:14 +0200
committerIhar Hrachyshka <ihrachys@redhat.com>2016-08-31 17:24:00 +0000
commit363e710295fad49f9c8996ae6efb9e1d9791628f (patch)
tree8aa4a65dbeeb86753157d7ac5474a42ba0e60899 /oslo_db/sqlalchemy/utils.py
parent87fb9cc84128fb5dceac483f892dba131c340d28 (diff)
downloadoslo-db-363e710295fad49f9c8996ae6efb9e1d9791628f.tar.gz
Fix DBReferenceError and DBNonExistentTable with new PyMySQL version
PyMySQL 0.7.7 changed the string format of the error raised, making oslo.db unable to catch the error: (pymysql.err.IntegrityError) (1452, u'23000Cannot add or update a child row: a foreign key constraint fails (`vaceciqnzs`.`resource_entity`, CONSTRAINT `foo_fkey` FOREIGN KEY (`foo_id`) REFERENCES `resource_foo` (`id`))') [SQL: u'INSERT INTO resource_entity (id, foo_id) VALUES (%(id)s, %(foo_id)s)'] [parameters: {'foo_id': 2, 'id': 1}] Change-Id: Ice7d7767842225951eaf48b71cedb2aabe5a84e4 (cherry picked from commit 1f3d509cab8c5d31f2ecd11561e1117d8c58316e)
Diffstat (limited to 'oslo_db/sqlalchemy/utils.py')
0 files changed, 0 insertions, 0 deletions