From 35a246fdd156a64831a4cd1ba246b929b18a8215 Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Sat, 14 Jun 2003 04:37:29 +0000 Subject: --- bin/oe/parse/__init__.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 bin/oe/parse/__init__.py (limited to 'bin/oe/parse/__init__.py') diff --git a/bin/oe/parse/__init__.py b/bin/oe/parse/__init__.py new file mode 100644 index 000000000..459c5f158 --- /dev/null +++ b/bin/oe/parse/__init__.py @@ -0,0 +1,31 @@ +""" +OpenEmbedded Parsers + +File parsers for the OpenEmbedded +(http://openembedded.org) build infrastructure. + +Copyright: (c) 2003 Chris Larson + +Based on functions from the base oe module, Copyright 2003 Holger Schurig +""" +__version__ = '1.0' + +__all__ = [ 'handlers', 'supports', 'handle' ] +handlers = [] + +import ConfHandler +import OEHandler + +def supports(fn): + """Returns true if we have a handler for this file, false otherwise""" + for h in handlers: + if h['supports'](fn): + return True + return False + +def handle(fn, data = {}): + """Call the handler that is appropriate for this file""" + for h in handlers: + if h['supports'](fn): + return h['handle'](fn, data) + return None -- cgit 1.2.3-korg