[tripleoclient] Getting a file checksum results in an infinite loop in py34

Bug #1500592 reported by Juan Antonio Osorio Robles
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Juan Antonio Osorio Robles

Bug Description

While the function file_checksum which is in tripleoclient/utils.py works for python 2.7. If you run the same function on a file it ends up in an infinite loop in Python 3.4

Changed in tripleo:
assignee: nobody → Juan Antonio Osorio Robles (juan-osorio-robles)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (master)

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

Changed in tripleo:
status: New → In Progress
Revision history for this message
Steven Hardy (shardy) wrote :

Getting a py34 check job in place to ensure we keep things working for python 3 would be a good idea.

Changed in tripleo:
importance: Undecided → High
Revision history for this message
Juan Antonio Osorio Robles (juan-osorio-robles) wrote :

I proposed a commit to get python 3X jobs in the gate https://review.openstack.org/#/c/228855/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

Reviewed: https://review.openstack.org/228608
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=24d57b674329b40788d365810c7b2cdf8d1eb255
Submitter: Jenkins
Branch: master

commit 24d57b674329b40788d365810c7b2cdf8d1eb255
Author: Juan Antonio Osorio Robles <email address hidden>
Date: Mon Sep 28 23:18:48 2015 +0300

    Fix file checksum function in for python 3.4

    The file_checksum function in tripleoclient/utils.py resulted in an
    infinite loop in py34 due to the fact that that function was expecting
    an empty character to finish the iteration. This is no longer the case
    in py34. So instead, we now iterate the file until it can no longer read
    anything. Even though it's more verbose; this works for both python 2.7
    and 3.4.

    Change-Id: I4849182992cac1209431a2147a83c9167d6a8af2
    Closes-Bug: #1500592

Changed in tripleo:
status: In Progress → Fix Committed
Steven Hardy (shardy)
Changed in tripleo:
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.