summaryrefslogtreecommitdiff
path: root/kconfiglib.py
diff options
context:
space:
mode:
Diffstat (limited to 'kconfiglib.py')
-rw-r--r--kconfiglib.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/kconfiglib.py b/kconfiglib.py
index f12c9eb..ee78e5e 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -2731,7 +2731,12 @@ class Kconfig(object):
# End of file reached. Terminate the final node and return it.
if end_token:
- raise KconfigError("Unexpected end of file " + self._filename)
+ raise KconfigError(
+ "expected '{}' at end of '{}'"
+ .format("endchoice" if end_token is _T_ENDCHOICE else
+ "endif" if end_token is _T_ENDIF else
+ "endmenu",
+ self._filename))
prev.next = None
return prev