From: Tomas Sedovic Date: Mon, 23 Apr 2012 13:10:33 +0000 (+0200) Subject: Fix `to_boolean` in cfn_helper X-Git-Tag: 2014.1~1923^2~19 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=9a0ee86fc62372b3c4a99b705981fe653bdaa088;p=openstack-build%2Fheat-build.git Fix `to_boolean` in cfn_helper The lowercase conversion and striping whitespace from strings was being ignored. Signed-off-by: Tomas Sedovic --- diff --git a/heat/cfntools/cfn_helper.py b/heat/cfntools/cfn_helper.py index fef28d5e..b9b62624 100644 --- a/heat/cfntools/cfn_helper.py +++ b/heat/cfntools/cfn_helper.py @@ -41,7 +41,7 @@ import sys def to_boolean(b): val = b.lower().strip() if isinstance(b, basestring) else b - return b in [True, 'true', 'yes', '1', 1] + return val in [True, 'true', 'yes', '1', 1] class HupConfig(object):