Handle ints passed to bool_from_string
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo-incubator |
Fix Released
|
Undecided
|
Rick Harris |
Bug Description
Nova and Oslo have two slightly different versions of `bool_from_string`.
For Nova, the int 1 and int 0 become True and False respectively.
For Oslo, both return False. (There are no tests defining this behavior in Oslo, so the official behavior is undefined).
Admittedly it's subjective, but Nova's behavior feels more correct here.
(Aside: Nova also has the behavior that string '2' is True whereas in Oslo it's False.
Again, Nova's behavior feels more correct, but given that, unlike the int case, Oslo has tests which *define* this as correct, it's probably better to hold onto the existing behavior.)
So the proposal here is to:
Teach Oslo's bool_from_string how to deal with ints like Nova's version.
Hold onto Oslo's dubious way of dealing with numbers as strings.
Changed in oslo: | |
assignee: | nobody → Rick Harris (rconradharris) |
status: | New → In Progress |
Changed in oslo: | |
milestone: | none → havana-1 |
status: | Fix Committed → Fix Released |
Changed in oslo: | |
milestone: | havana-1 → 2013.2 |
Fix proposed to branch: master /review. openstack. org/28856
Review: https:/