diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2015-06-10 11:53:28 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2015-06-10 12:04:25 +0200 |
| commit | a95f477eafc0b6708c3ce671fce7302ecec4f789 (patch) | |
| tree | 3e50717ce773e50651f94c942f7cc5205b6ad1e3 | |
| parent | 9891915e09ed0e33a7a3f28e3acf85a45ed6e50a (diff) | |
Test for "y" before "m" and "n" in a few places.
"y" is more common in those spots.
| -rw-r--r-- | kconfiglib.py | 8 |
1 files 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) )): |
