Creating task with invalid additionalProperties crashes in Python 3

Bug #1439513 reported by Kamil Rykowski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Medium
Kamil Rykowski
Nominated for Kilo by Erno Kuvaja

Bug Description

During preparing new unittests for task module in patch - https://review.openstack.org/#/c/165436/ - I've hit a bug in v2.tasks which fails in python 3 when trying to set invalid property for task. All of that is because py3 doesn't have such function as `unicode`:

https://github.com/openstack/python-glanceclient/blob/master/glanceclient/v2/tasks.py#L113

Changed in python-glanceclient:
status: New → Incomplete
status: Incomplete → In Progress
assignee: nobody → Kamil Rykowski (kamil-rykowski)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-glanceclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/170011

Changed in python-glanceclient:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (master)

Reviewed: https://review.openstack.org/170011
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=a6234d1c4e0ba8c6bbf822cfe89473436b583acc
Submitter: Jenkins
Branch: master

commit a6234d1c4e0ba8c6bbf822cfe89473436b583acc
Author: Kamil Rykowski <email address hidden>
Date: Thu Apr 2 08:15:17 2015 +0200

    Creating task with invalid property crashes in py3

    Currently when you are trying to set invalid additional property for
    task using py3 interpreter it will fail, because function `unicode` does
    not exist in py3.

    Fix it by replacing `unicode` with `utils.exception_to_str` which is
    used in other modules already.

    Change-Id: I5897868f801467a2eaa7585b5f2d578cef358426
    Closes-Bug: 1439513

Changed in python-glanceclient:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-glanceclient (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/199536

Changed in python-glanceclient:
importance: Low → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (stable/kilo)

Reviewed: https://review.openstack.org/199536
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=5533018d5cc60007d0abe5b326b4be253e96ef2b
Submitter: Jenkins
Branch: stable/kilo

commit 5533018d5cc60007d0abe5b326b4be253e96ef2b
Author: Kamil Rykowski <email address hidden>
Date: Thu Apr 2 08:15:17 2015 +0200

    Creating task with invalid property crashes in py3

    Currently when you are trying to set invalid additional property for
    task using py3 interpreter it will fail, because function `unicode` does
    not exist in py3.

    Fix it by replacing `unicode` with `utils.exception_to_str` which is
    used in other modules already.

    Change-Id: I5897868f801467a2eaa7585b5f2d578cef358426
    Closes-Bug: 1439513
    (cherry picked from commit a6234d1c4e0ba8c6bbf822cfe89473436b583acc)

tags: added: in-stable-kilo
Changed in python-glanceclient:
milestone: none → 1.0.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.