From 715435c816b51b6ec8d38453326eecd35c339fd9 Mon Sep 17 00:00:00 2001 From: Rick Harris Date: Tue, 14 May 2013 15:23:55 +0000 Subject: Use strict=True instead of `is_valid_boolstr` Oslo's `bool_from_string` learned the `strict` keyword which allows callers to detect invalid boolean values, so we can use that instead of having a new Nova-specific function. Change-Id: I61bfa4029897c7304bd54d6cdae9f9a9bc4c1f78 --- nova/utils.py | 6 ------ 1 file changed, 6 deletions(-) (limited to 'nova/utils.py') diff --git a/nova/utils.py b/nova/utils.py index 3020781c8..3e9d8c597 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -605,12 +605,6 @@ def is_int_like(val): return False -def is_valid_boolstr(val): - """Check if the provided string is a valid bool string or not.""" - boolstrs = ('true', 'false', 'yes', 'no', 'y', 'n', '1', '0') - return str(val).lower() in boolstrs - - def is_valid_ipv4(address): """Verify that address represents a valid IPv4 address.""" try: -- cgit