swift tool (st) compares an integer-typed object size to a string-typed segment size on upload

Bug #817115 reported by Eugene Shih
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-swiftclient
Fix Released
Low
Unassigned

Bug Description

The upload command in the swift tool in version 1.3 and 1.4.3 compares an integer (getsize(path)) to a string(options.segment_size). Under python 2.7, this appears to always return True, since a <type 'int'> always less than <type 'str'>.

Propose to cast the string to a int to fix bug.

Revision history for this message
Eugene Shih (eugene-shih) wrote :
Pete Zaitcev (zaitcev)
Changed in swift:
status: New → Confirmed
Revision history for this message
Pete Zaitcev (zaitcev) wrote :

The history of this is in the depths of bzr somewhere. Every gitified version has this problem, and the 20100817 that I kept has no segmented uploads.

Revision history for this message
Chmouel Boudjnah (chmouel) wrote :
affects: swift → python-swiftclient
Changed in python-swiftclient:
status: Confirmed → Fix Released
importance: Undecided → Low
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.