]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix Python 3 issues in backup
authorVictor Stinner <vstinner@redhat.com>
Tue, 23 Jun 2015 09:20:47 +0000 (11:20 +0200)
committerVictor Stinner <vstinner@redhat.com>
Wed, 24 Jun 2015 15:11:05 +0000 (17:11 +0200)
commit300d441d5148c3f8437700298f88982185ebe73f
treee3b2590c0fbf8a6868370c622f1c92173fbe765c
parentcde57ee995a849d3a6c4cbcc9990a65e2f08281f
Fix Python 3 issues in backup

* Replace (int, long) with six.integer_types: the "long" type has been
  removed in Python 3
* Replace str.encode("bas64") with base64.encodestring(str), base64
  text codec has been removed in Python 3. Same change for decode
  (base64.decodestring)
* On Python 3, encode JSON to UTF-8
* tox.ini: add the following tests to Python 3

  - cinder.tests.unit.test_backup
  - cinder.tests.unit.test_backup_driver_base

Blueprint cinder-python3
Change-Id: I86e04f8fbe9a3ce8849fd141dc3ee914e73c8796
cinder/backup/driver.py
cinder/quota.py
cinder/tests/unit/test_backup_driver_base.py
tox.ini