Skip to contentSkip to conversation

cooker: Drop useless parsing exception

PATCH New Richard Purdie 1 participant 1 message Jan 4, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cooker: Drop useless parsing exception

The SyntaxError exception simply shows the recipe that failed to parse which is pretty useless without the actual exception. We could make it print more info, however we can just use one of the more generic handlers instead and remove this one.

For a python indentation error, this leads to a much more readable error message.

bitbake/lib/bb/cooker.py +0 -5
index 4df8881..5ceb198 100644
@@ -2125,11 +2125,6 @@ class CookerParser(object):
             logger.error('ExpansionError during parsing %s: %s', value.recipe, str(exc))
             self.shutdown(clean=False)
             return False
-        except SyntaxError as exc:
-            self.error += 1
-            logger.error('Unable to parse %s', exc.recipe)
-            self.shutdown(clean=False)
-            return False
         except Exception as exc:
             self.error += 1
             etype, value, tb = sys.exc_info()