From 99ef6cf65bdce722e23cc9cebd2b7285afdd925e Mon Sep 17 00:00:00 2001 From: Michael Still Date: Sun, 19 May 2013 09:19:42 +1000 Subject: [PATCH] The utils module in oslo is no more. The utils module in oslo has been removed (with most of its functionality moving across to strutils). Luckily it was imported in heat but never actually used, so removing it is relatively easy. Change-Id: Ic3cb8bb9bbae282f5a753c6abe58b1d47ad640db --- moniker/openstack/common/utils.py | 59 ------------------------------- openstack-common.conf | 1 - 2 files changed, 60 deletions(-) delete mode 100644 moniker/openstack/common/utils.py diff --git a/moniker/openstack/common/utils.py b/moniker/openstack/common/utils.py deleted file mode 100644 index 05f0e9f7b..000000000 --- a/moniker/openstack/common/utils.py +++ /dev/null @@ -1,59 +0,0 @@ -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2011 OpenStack LLC. -# 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 -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -""" -System-level utilities and helper functions. -""" - -import logging - -LOG = logging.getLogger(__name__) - - -def int_from_bool_as_string(subject): - """ - Interpret a string as a boolean and return either 1 or 0. - - Any string value in: - - ('True', 'true', 'On', 'on', '1') - - is interpreted as a boolean True. - - Useful for JSON-decoded stuff and config file parsing - """ - return bool_from_string(subject) and 1 or 0 - - -def bool_from_string(subject): - """ - Interpret a string as a boolean. - - Any string value in: - - ('True', 'true', 'On', 'on', 'Yes', 'yes', '1') - - is interpreted as a boolean True. - - Useful for JSON-decoded stuff and config file parsing - """ - if isinstance(subject, bool): - return subject - if isinstance(subject, basestring): - if subject.strip().lower() in ('true', 'on', 'yes', '1'): - return True - return False diff --git a/openstack-common.conf b/openstack-common.conf index de872bf9f..3ddf82289 100644 --- a/openstack-common.conf +++ b/openstack-common.conf @@ -24,7 +24,6 @@ module=service module=setup module=threadgroup module=timeutils -module=utils module=uuidutils module=version module=wsgi