From ef5091f587796d0d5bba811e5ddacc53fa6d9198 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Tue, 16 Jan 2018 03:43:30 +0100 Subject: Do not optimize promptless choice symbols Choice symbols without prompts are pointless and probably nonexistent in practice, so it's a bit silly to run the no-prompt optimization for them. Piggyback copyright year update. --- kconfiglib.py | 5 ++--- testsuite.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/kconfiglib.py b/kconfiglib.py index 713ca41..8eea9cf 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -1,4 +1,4 @@ -# Copyright (c) 2011-2017, Ulf Magnusson +# Copyright (c) 2011-2018, Ulf Magnusson # SPDX-License-Identifier: ISC """ @@ -2693,8 +2693,7 @@ class Symbol(object): # safe. self.choice.user_selection = self self.choice._was_set = True - if self._is_user_assignable(): - self.choice._rec_invalidate() + self.choice._rec_invalidate() else: self.user_value = value self._was_set = True diff --git a/testsuite.py b/testsuite.py index 2f00e2f..8133465 100644 --- a/testsuite.py +++ b/testsuite.py @@ -1,4 +1,4 @@ -# Copyright (c) 2011-2017, Ulf Magnusson +# Copyright (c) 2011-2018, Ulf Magnusson # SPDX-License-Identifier: ISC # This is the Kconfiglib test suite. It runs selftests on Kconfigs provided by -- cgit v1.2.3