From 67704952cd6725af4fa7304367fc333bb957c078 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Thu, 13 Dec 2012 12:29:24 +0100 Subject: Add get_config() for Menu, Choice, and Comment. Omission. --- kconfiglib.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'kconfiglib.py') diff --git a/kconfiglib.py b/kconfiglib.py index c790033..625ff6a 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -2621,8 +2621,7 @@ class Symbol(Item, _HasVisibility): return self.help def get_config(self): - """Returns the Config instance that represents the configuration this - symbol is from.""" + """Returns the Config instance this symbol is from.""" return self.config def get_def_locations(self): @@ -3000,6 +2999,10 @@ class Menu(Item): # Public interface # + def get_config(self): + """Return the Config instance this menu is from.""" + return self.config + def get_visibility(self): """Returns the visibility of the menu. This also affects the visibility of subitems. See also Symbol.get_visibility().""" @@ -3198,6 +3201,10 @@ class Choice(Item, _HasVisibility): symbol, returns that symbol. Otherwise, returns None.""" return self.user_val + def get_config(self): + """Returns the Config instance this choice is from.""" + return self.config + def get_name(self): """For named choices, returns the name. Returns None for unnamed choices. No named choices appear anywhere in the kernel Kconfig @@ -3409,6 +3416,10 @@ class Comment(Item): # Public interface # + def get_config(self): + """Returns the Config instance this comment is from.""" + return self.config + def get_visibility(self): """Returns the visibility of the comment. See also Symbol.get_visibility().""" -- cgit v1.2.3