]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Replace unicode with six.text_type
authorVictor Stinner <vstinner@redhat.com>
Wed, 10 Jun 2015 12:39:37 +0000 (14:39 +0200)
committerVictor Stinner <vstinner@redhat.com>
Wed, 10 Jun 2015 13:00:46 +0000 (15:00 +0200)
commitf658c4bb49cebc1eaec50a165f890f7d2a9f8f88
treec74c746f7ad72d28a30d37055b9a312b904a6e1f
parent062300ea8a9bead3310f01bd0d07e55b9f2df5ae
Replace unicode with six.text_type

The "unicode" type was renamed to "str" in Python 3. Use six.text_type
to make Cinder compatible with Python 3.

The initial patch was generated by the unicode operation of sixer tool:
https://pypi.python.org/pypi/sixer

Manual changes:

* cinder/volume/drivers/san/hp/hp_3par_iscsi.py:
  replace "isinstance(value, str) or isinstance(value, unicode)"
  with "isinstance(value, six.string_types)"
* cinder/volume/drivers/san/hp/hp_3par_iscsi.py:
  bump the version to 2.0.17
* Revert changes on hacking: hacking explicitly searchs the "unicode"
  pattern for Python 2. Hacking may require more work to be ported to
  Python 3.
* Revert changes on docstrings and strings

Change-Id: I68ea8a81a66c9377b2fe20e3f545dce8b691c398
cinder/utils.py
cinder/volume/drivers/emc/emc_vmax_https.py
cinder/volume/drivers/ibm/storwize_svc/helpers.py
cinder/volume/drivers/san/hp/hp_3par_iscsi.py