include(fn, s, data)
return
- fatal("PARSER: %s:%d: unparsed line" % (fn, lineno));
+ raise ParseError("%s:%d: unparsed line" % (fn, lineno));
# Add us to the handlers list
from oe.parse import handlers
"""
__version__ = '1.0'
-__all__ = [ 'handlers', 'supports', 'handle', 'init' ]
+__all__ = [ 'handlers', 'supports', 'handle', 'init', 'ConfHandler', 'OEHandler', 'SRPMHandler', 'ParseError' ]
handlers = []
+class ParseError(Exception):
+ """Exception raised when parsing fails"""
+
import ConfHandler
+ConfHandler.ParseError = ParseError
import OEHandler
+OEHandler.ParseError = ParseError
import SRPMHandler
+SRPMHandler.ParseError = ParseError
def supports(fn, data):
"""Returns true if we have a handler for this file, false otherwise"""