Joshua Harlow b9739be699 If 'bool_from_string' provided a boolean just return it
Typically the pattern of the following happens:

>>> s = dict()
>>> v = s.get("blah", True)
>>> v = strutils.bool_from_string(v)

In this case we can avoid converting the value of 'v' to a bool
if it was already a boolean (and if it wasn't then the rest of
the code can be ran to attempt to convert it to one). This avoids
needlessly converting things from bool -> string -> bool which
is not really needed in this case.

Change-Id: Id7397e91e754ff2c63b3f112e95aedf82cd31717
2015-09-16 21:07:32 -07:00
..
2015-01-16 16:19:54 -06:00