diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2018-06-20 09:42:18 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2018-06-20 09:42:18 +0200 |
| commit | 94e6db54b8c8411cead8cc4186aa9199a23d617e (patch) | |
| tree | 378d1c5ec3da74f8a544a1aa578c42bda2675d99 | |
| parent | ca89ca0c0c4207590d7ac6a38383d097e4b7c23f (diff) | |
Simplify MenuNode.referenced() a bit
Can get the initial set from expr_items(self.dep), since it's always
included and always returns a new set().
| -rw-r--r-- | kconfiglib.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index 3101c65..d62c7a8 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -4206,7 +4206,9 @@ class MenuNode(object): Also includes dependencies inherited from surrounding menus and if's. Choices appear in the dependencies of choice symbols. """ - res = set() + # self.dep is included to catch dependencies from a lone 'depends on' + # when there are no properties to propagate it to + res = expr_items(self.dep) if self.prompt: res |= expr_items(self.prompt[1]) @@ -4231,10 +4233,6 @@ class MenuNode(object): res.add(high) res |= expr_items(cond) - # Need this to catch dependencies from a lone 'depends on' when there - # are no properties to propagate it to - res |= expr_items(self.dep) - return res def __repr__(self): |
