From 1b9489fb0d556a2661c299cf67ed3d26ffcb2dce Mon Sep 17 00:00:00 2001 From: Rick Harris Date: Thu, 9 May 2013 22:39:20 +0000 Subject: Use Oslo's `bool_from_string` Oslo provides an equivalent implmentation of `bool_from_str` so we should switch the code to use that instead. Change-Id: I382f23af2468e276ae4342dff18cf06e1c24b755 --- nova/utils.py | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'nova/utils.py') diff --git a/nova/utils.py b/nova/utils.py index 64606f4f8..25158322d 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -655,19 +655,6 @@ def parse_server_string(server_str): return ('', '') -def bool_from_str(val): - """Convert a string representation of a bool into a bool value.""" - - if not val: - return False - try: - return True if int(val) else False - except ValueError: - return val.lower() == 'true' or \ - val.lower() == 'yes' or \ - val.lower() == 'y' - - def is_int_like(val): """Check if a value looks like an int.""" try: -- cgit