summaryrefslogtreecommitdiff
path: root/kconfiglib.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2012-12-15 07:23:14 +0100
committerUlf Magnusson <ulfalizer@gmail.com>2012-12-15 07:23:14 +0100
commitacdd80de097e528a95c5918d88de692e5c5f9965 (patch)
treeb9a1854726ec199266c4cce0fc4d575b3fd314e1 /kconfiglib.py
parentf3114d250232a6481c52bc6057094ace825b67e2 (diff)
Simplify _parse_error().
Diffstat (limited to 'kconfiglib.py')
-rw-r--r--kconfiglib.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/kconfiglib.py b/kconfiglib.py
index d55d020..bb40771 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -3727,12 +3727,8 @@ def _parse_error(s, msg, filename, linenr):
if s.endswith("\n"):
s = s[:-1]
- error_str += 'Error while parsing "{0}"'.format(s)
-
- if msg is None:
- error_str += "."
- else:
- error_str += ": " + msg
+ error_str += 'Error while parsing "{0}"'.format(s) + \
+ ("." if msg is None else ": " + msg)
raise Kconfig_Syntax_Error, error_str