Python 3: tempfile.NamedTemporaryFile().write is given a text string instead of bytes

Bug #1281372 reported by Cyril Roelandt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Low
Cyril Roelandt

Bug Description

In tests/test_http.py, tempfile.NamedTemporaryFile().write() is given text strings instead of bytes; this must be fixed in order for the code to be Python3-compliant.

Revision history for this message
Cyril Roelandt (cyril-roelandt) wrote :

OK, not sure why this does not happen automagically, but here's the patch I submitted:

https://review.openstack.org/#/c/74143/

Changed in python-glanceclient:
assignee: nobody → Cyril Roelandt (cyril-roelandt)
Changed in python-glanceclient:
status: New → In Progress
Zhi Yan Liu (lzy-dev)
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/74143
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=fe006e06713ab4638756bffa60d0dfaa8cd093a9
Submitter: Jenkins
Branch: master

commit fe006e06713ab4638756bffa60d0dfaa8cd093a9
Author: Cyril Roelandt <email address hidden>
Date: Mon Feb 17 20:59:16 2014 +0100

    Pass bytes to tempfile.NamedTemporaryFile().write()

    This method takes bytes as input; the current code fails in Python 3.

    Closes-Bug: #1281372
    Change-Id: I070d9e9e07523c124f3168b55048fb9d1b338f69

Changed in python-glanceclient:
status: In Progress → Fix Committed
Louis Taylor (kragniz)
Changed in python-glanceclient:
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.