From 71c01ad03eacad03e88a1e61dcba312777810b64 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 5 Nov 2016 14:53:48 +0000 Subject: [PATCH] Remove unreachable code, and simplify is_valid_bool. --- src/common/config.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/common/config.py b/src/common/config.py index 37d31323b..4d756b37d 100644 --- a/src/common/config.py +++ b/src/common/config.py @@ -605,16 +605,14 @@ class Config: def is_valid_bool(self, val): if val == 'True': return True - elif val == 'False': + if val == 'False': return False - else: - ival = self.is_valid_int(val) - if ival: - return True - elif ival is None: - return None - return False - return None + ival = self.is_valid_int(val) + if ival: + return True + if ival is None: + return None + return False def is_valid_string(self, val): return val