]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Fix `to_boolean` in cfn_helper
authorTomas Sedovic <tomas@sedovic.cz>
Mon, 23 Apr 2012 13:10:33 +0000 (15:10 +0200)
committerTomas Sedovic <tomas@sedovic.cz>
Mon, 23 Apr 2012 13:13:28 +0000 (15:13 +0200)
The lowercase conversion and striping whitespace from strings was being ignored.

Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
heat/cfntools/cfn_helper.py

index fef28d5e34522d5f0cf6ee0a9ae7af1cf3141877..b9b62624bba1244fec1e0c416011974935e78f2f 100644 (file)
@@ -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):