]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Removes unused code in quantum.common
authorZhongyue Luo <zhongyue.nah@intel.com>
Mon, 3 Dec 2012 07:45:51 +0000 (15:45 +0800)
committerZhongyue Luo <zhongyue.nah@intel.com>
Mon, 3 Dec 2012 07:49:27 +0000 (15:49 +0800)
Removed boolize() in quantum.common.utils

Fixes bug #877120

Change-Id: Icb30b4200baf8743bbee6b4dd035c8b316c38533

quantum/common/utils.py

index 7cb6639bdc0b6d6793216ede4b1e8c9ace1bc0fa..ed8e6d772eb419e62196b81262d69891a569b183 100644 (file)
@@ -1,6 +1,7 @@
 # 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
@@ -33,21 +34,6 @@ TIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ"
 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.