[poky] [PATCH 1/2] bitbake/codeparser: fix raising of ShellSyntaxError

Joshua Lock josh at linux.intel.com
Fri Feb 25 02:52:19 PST 2011


From: Joshua Lock <josh at linux.intel.com>

To raise the ShellSyntaxError we need to import it's module and reference it
by namespace.

Signed-off-by: Joshua Lock <josh at linux.intel.com>
---
 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 bfffcac..c887a3c 100644
--- a/bitbake/lib/bb/codeparser.py
+++ b/bitbake/lib/bb/codeparser.py
@@ -4,7 +4,7 @@ import logging
 import os.path
 import bb.utils, bb.data
 from itertools import chain
-from pysh import pyshyacc, pyshlex
+from pysh import pyshyacc, pyshlex, sherrors
 
 
 logger = logging.getLogger('BitBake.CodeParser')
@@ -227,7 +227,7 @@ class ShellParser():
         try:
             tokens, _ = pyshyacc.parse(value, eof=True, debug=False)
         except pyshlex.NeedMore:
-            raise ShellSyntaxError("Unexpected EOF")
+            raise sherrors.ShellSyntaxError("Unexpected EOF")
 
         for token in tokens:
             self.process_tokens(token)
-- 
1.7.4




More information about the poky mailing list