# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011, Nicira Networks, Inc.
+# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
LOG = logging.getLogger(__name__)
-def boolize(subject):
- """
- Quak like a boolean
- """
- if isinstance(subject, bool):
- return subject
- elif isinstance(subject, basestring):
- sub = subject.strip().lower()
- if sub == 'true':
- return True
- elif sub == 'false':
- return False
- return subject
-
-
def read_cached_file(filename, cache_info, reload_func=None):
"""Read from a file if it has been modified.