summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2012-12-14 12:02:44 +0100
committerUlf Magnusson <ulfalizer@gmail.com>2012-12-14 12:02:44 +0100
commit710fc659bf5701a6dd31896c40b1d95f834863d1 (patch)
tree3dc47a122715024896dda8c2399c685ba64aec0e
parent6dfc4d6a3ef281b96890db3ece152a9b8bb4d19b (diff)
Remove superfluous variable in get_value().
-rw-r--r--kconfiglib.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/kconfiglib.py b/kconfiglib.py
index dd81d7f..c7786a6 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -2869,14 +2869,13 @@ class Symbol(Item, _HasVisibility):
# Check if the value is valid for our type
- valid = ( self.type == BOOL and (v == "n" or v == "y") ) or \
+ if not (( self.type == BOOL and (v == "n" or v == "y") ) or
( self.type == TRISTATE and (v == "n" or v == "m" or
- v == "y") ) or \
- ( self.type == STRING ) or \
- ( self.type == INT and _is_base_n(v, 10) ) or \
- ( self.type == HEX and _is_base_n(v, 16) )
+ v == "y") ) or
+ ( self.type == STRING ) or
+ ( self.type == INT and _is_base_n(v, 10) ) or
+ ( self.type == HEX and _is_base_n(v, 16) )):
- if not valid:
self.config._warn('the value "{0}" is invalid for {1}, which has type {2}. '
"Assignment ignored."
.format(v, self.name, typename[self.type]))