Patchwork [bitbake-devel,WIP,1/2] pysh: Say what kind of token isn't implemented

login
register
mail settings
Submitter Olof Johansson
Date May 7, 2013, 9:22 a.m.
Message ID <1367918558-16136-2-git-send-email-olof.johansson@axis.com>
Download mbox | patch
Permalink /patch/49403/
State Accepted
Commit 1acb9c338018c612db519d2db823c66b567863b9
Headers show

Comments

Olof Johansson - May 7, 2013, 9:22 a.m.
When the shell lexer finds an unrecognized dollar token, the error
message should contain what kind of token it is having problems with.

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
---
 lib/bb/pysh/pyshlex.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/lib/bb/pysh/pyshlex.py b/lib/bb/pysh/pyshlex.py
index b977b5e..b301236 100644
--- a/lib/bb/pysh/pyshlex.py
+++ b/lib/bb/pysh/pyshlex.py
@@ -292,7 +292,7 @@  class WordLexer:
         elif sep=='${':
             parsefunc = self._parse_parameter
         else:
-            raise NotImplementedError()
+            raise NotImplementedError(sep)
             
         pos, closed = parsefunc(buf, result, eof)
         return pos, closed