[kernel-team] 03/04: kconfigeditor2: Change matching of tristate values to match upstream kconfig

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Sat Jan 28 03:15:18 UTC 2017


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch master
in repository kernel-team.

commit 237c67710efe881efb70e529e1082a28a6d4641c
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Sat Jan 28 02:39:05 2017 +0000

    kconfigeditor2: Change matching of tristate values to match upstream kconfig
    
    Only the first character is checked.
---
 utils/kconfigeditor2/kconfigeditor/kconfig/config.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/utils/kconfigeditor2/kconfigeditor/kconfig/config.py b/utils/kconfigeditor2/kconfigeditor/kconfig/config.py
index 847d04d..062cc2c 100644
--- a/utils/kconfigeditor2/kconfigeditor/kconfig/config.py
+++ b/utils/kconfigeditor2/kconfigeditor/kconfig/config.py
@@ -109,7 +109,7 @@ class FileReader(object):
         reset = __init__
 
         def entry(self):
-            if self.value in ('y', 'm', 'n', None):
+            if self.value is None or self.value[0] in ('y', 'm', 'n'):
                 return FileEntryTristate(self.name, self.value, self.comments)
             return FileEntry(self.name, self.value, self.comments)
 
@@ -188,11 +188,11 @@ class FileEntryTristate(FileEntry):
     VALUE_MOD = object()
 
     def __init__(self, name, value, comments=None):
-        if value == 'n' or value is None:
+        if value is None or value[0] == 'n':
             value = self.VALUE_NO
-        elif value == 'y':
+        elif value[0] == 'y':
             value = self.VALUE_YES
-        elif value == 'm':
+        elif value[0] == 'm':
             value = self.VALUE_MOD
         else:
             raise NotImplementedError

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/kernel-team.git



More information about the Kernel-svn-changes mailing list