summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/codeparser.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/codeparser.py')
-rw-r--r--bitbake/lib/bb/codeparser.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/bb/codeparser.py b/bitbake/lib/bb/codeparser.py
index ddd1b97dcb..3f8ac1d5f6 100644
--- a/bitbake/lib/bb/codeparser.py
+++ b/bitbake/lib/bb/codeparser.py
@@ -368,8 +368,9 @@ class ShellParser():
368 def _parse_shell(self, value): 368 def _parse_shell(self, value):
369 try: 369 try:
370 tokens, _ = pyshyacc.parse(value, eof=True, debug=False) 370 tokens, _ = pyshyacc.parse(value, eof=True, debug=False)
371 except pyshlex.NeedMore: 371 except Exception:
372 raise sherrors.ShellSyntaxError("Unexpected EOF") 372 bb.error('Error during parse shell code, the last 5 lines are:\n%s' % '\n'.join(value.split('\n')[-5:]))
373 raise
373 374
374 self.process_tokens(tokens) 375 self.process_tokens(tokens)
375 376