Go to file
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-05-05 19:39:52 +00:00
2014-06-18 23:12:10 -04:00
2015-07-15 18:20:18 +00:00
2015-07-15 01:36:48 +00:00
2015-08-08 11:41:38 +00:00

oslo.utils

Latest Version

Downloads

The oslo.utils library provides support for common utility type functions, such as encoding, exception handling, string manipulation, and time handling.

Description
OpenStack library utils
Readme 8.4 MiB
Languages
Python 100%