oslo.utils/oslo_utils
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
..
tests If 'bool_from_string' provided a boolean just return it 2015-09-16 21:07:32 -07:00
__init__.py Move files out of the namespace package 2015-01-06 17:07:36 -05:00
_i18n.py Update Oslo imports to remove namespace package 2015-01-21 19:56:45 -05:00
encodeutils.py Fix exception_to_unicode() for oslo_i18n Message 2015-07-02 23:53:41 +02:00
eventletutils.py Provide common fetch_current_thread_functor function 2015-03-16 15:33:18 -07:00
excutils.py Provide a common exception caused by base class 2015-08-04 15:49:21 -07:00
fileutils.py Add write_to_tempfile back to fileutils 2015-07-08 14:29:36 +00:00
fixture.py Add TimeFixture 2015-01-16 16:19:54 -06:00
importutils.py only capture the ImportError when importing 2015-09-15 15:59:50 +08:00
netutils.py Utility API to generate EUI-64 IPv6 address 2015-02-18 19:55:28 +00:00
reflection.py Allow access to reflection 'get_members' 2015-08-03 21:18:03 -07:00
strutils.py If 'bool_from_string' provided a boolean just return it 2015-09-16 21:07:32 -07:00
timeutils.py Adding checking around the monotonic import 2015-07-21 11:49:08 +01:00
units.py Move files out of the namespace package 2015-01-06 17:07:36 -05:00
uuidutils.py Add missing reflection + uuidutils docs 2015-04-13 10:49:20 -07:00
versionutils.py versionutils: add version convert helper methods 2015-07-10 15:42:12 +08:00