diff options
author | Joshua Lock <josh@linux.intel.com> | 2011-02-25 10:22:44 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-02-25 15:38:29 +0000 |
commit | 92d5e6c07fe850f03ab9e3a6786076bed6c3e34e (patch) | |
tree | cf33d3d13cda118381da4843e0ccce10223370b5 | |
parent | 0b17cbc8f27f1dc47d3f7c7c829222fc5abb5d9c (diff) | |
download | poky-92d5e6c07fe850f03ab9e3a6786076bed6c3e34e.tar.gz |
bitbake/codeparser: fix raising of ShellSyntaxError
To raise the ShellSyntaxError we need to import it's module and reference it
by namespace.
Signed-off-by: Joshua Lock <josh@linux.intel.com>
-rw-r--r-- | bitbake/lib/bb/codeparser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/codeparser.py b/bitbake/lib/bb/codeparser.py index bfffcacc33..c887a3ca08 100644 --- a/bitbake/lib/bb/codeparser.py +++ b/bitbake/lib/bb/codeparser.py | |||
@@ -4,7 +4,7 @@ import logging | |||
4 | import os.path | 4 | import os.path |
5 | import bb.utils, bb.data | 5 | import bb.utils, bb.data |
6 | from itertools import chain | 6 | from itertools import chain |
7 | from pysh import pyshyacc, pyshlex | 7 | from pysh import pyshyacc, pyshlex, sherrors |
8 | 8 | ||
9 | 9 | ||
10 | logger = logging.getLogger('BitBake.CodeParser') | 10 | logger = logging.getLogger('BitBake.CodeParser') |
@@ -227,7 +227,7 @@ class ShellParser(): | |||
227 | try: | 227 | try: |
228 | tokens, _ = pyshyacc.parse(value, eof=True, debug=False) | 228 | tokens, _ = pyshyacc.parse(value, eof=True, debug=False) |
229 | except pyshlex.NeedMore: | 229 | except pyshlex.NeedMore: |
230 | raise ShellSyntaxError("Unexpected EOF") | 230 | raise sherrors.ShellSyntaxError("Unexpected EOF") |
231 | 231 | ||
232 | for token in tokens: | 232 | for token in tokens: |
233 | self.process_tokens(token) | 233 | self.process_tokens(token) |