From 1747d18e5141e9ebb180474776358d496712f8af Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Thu, 6 Dec 2012 01:58:01 +0100 Subject: Fix get_mainmenu_text() when none available. --- kconfiglib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kconfiglib.py b/kconfiglib.py index 1e5caad..f07a6a0 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -731,7 +731,8 @@ class Config(): """Returns the text of the 'mainmenu' statement (with $-references to symbols replaced by symbol values), or None if the configuration has no 'mainmenu' statement.""" - return self._expand_sym_refs(self.mainmenu_text) + return None if self.mainmenu_text is None else \ + self._expand_sym_refs(self.mainmenu_text) def get_defconfig_filename(self): """Returns the name of the defconfig file, which is the first existing -- cgit v1.2.3