rstrip() strips characters not strings
Bug #1155761 reported by
Johannes Erdfelt
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Johannes Erdfelt |
Bug Description
In nova/virt/
However, rstrip() works on characters and not strings. As a result, rstrip() could strip too many characters off.
Example:
>>> "foobaz.
'fooba'
Changed in nova: | |
assignee: | nobody → Johannes Erdfelt (johannes.erdfelt) |
status: | New → In Progress |
Changed in nova: | |
milestone: | none → grizzly-rc1 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | grizzly-rc1 → 2013.1 |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/24527 github. com/openstack/ nova/commit/ 397bb31c243d03c 050c14ed60a8711 09b1314b2d
Committed: http://
Submitter: Jenkins
Branch: master
commit 397bb31c243d03c 050c14ed60a8711 09b1314b2d
Author: Johannes Erdfelt <email address hidden>
Date: Fri Mar 15 15:08:58 2013 +0000
rstrip() strips characters, not strings
Fixes bug 1155761
This use of rstrip() could end stripping off more than just the ".gz"
suffix if the filename contains any of the ".gz" characters at the end
of the string.
Change-Id: Id75388453f286c a7b05bab51c9826 c43c10ef516