Comment 0 for bug 1763179

Revision history for this message
Sean McGinnis (sean-mcginnis) wrote :

Change https://review.openstack.org/#/c/557778/ changed the return value for coerce() to explicitly force the value to be unicode. This causes problems with Python 2 runtimes, where the expected value of a string is no longer a string but now unicode (see: https://github.com/openstack/cinder/blob/b89e73a2ac315927d2eee42129597b14e87ba685/cinder/tests/unit/volume/drivers/dell_emc/vmax/test_vmax.py#L3412)

The correct fix should be to use either six.text_type to convert it, or format it into a string as is being done, but without forcing it to be a unicode string. "%s" will end up being the correct type depending on whether it is running under py2 or py3.