From a95f477eafc0b6708c3ce671fce7302ecec4f789 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Wed, 10 Jun 2015 11:53:28 +0200 Subject: Test for "y" before "m" and "n" in a few places. "y" is more common in those spots. --- kconfiglib.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kconfiglib.py b/kconfiglib.py index 3b015ab..0a688b5 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -1770,7 +1770,7 @@ class Config(object): left, right = right, left if not isinstance(left, Symbol): return None - if (relation == EQUAL and (right == "m" or right == "y")) or \ + if (relation == EQUAL and (right == "y" or right == "m")) or \ (relation == UNEQUAL and right == "n"): return left return None @@ -2445,9 +2445,9 @@ class Symbol(Item): return # Check if the value is valid for our type - 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 + if not ((self.type == BOOL and (v == "y" or v == "n") ) or + (self.type == TRISTATE and (v == "y" or v == "m" or + v == "n") ) or (self.type == STRING ) or (self.type == INT and _is_base_n(v, 10) ) or (self.type == HEX and _is_base_n(v, 16) )): -- cgit v1.2.3