Skip to content

Commit

Permalink
Do not optimize promptless choice symbols
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ulfalizer committed Jan 16, 2018
1 parent 82561b0 commit ef5091f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions kconfiglib.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2011-2017, Ulf Magnusson
# Copyright (c) 2011-2018, Ulf Magnusson
# SPDX-License-Identifier: ISC

"""
Expand Down Expand Up @@ -2693,8 +2693,7 @@ def set_value(self, value):
# 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
Expand Down
2 changes: 1 addition & 1 deletion testsuite.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit ef5091f

Please sign in to comment.