diff options
author | Chris Larson <clarson@kergoth.com> | 2003-06-14 04:37:29 +0000 |
---|---|---|
committer | Chris Larson <clarson@kergoth.com> | 2003-06-14 04:37:29 +0000 |
commit | 35a246fdd156a64831a4cd1ba246b929b18a8215 (patch) | |
tree | b866187416de56a703a3278f36c0ea8f098e03c6 /bin/oe/parse/__init__.py | |
parent | f2263ec2aff4228169c4300446e3303e516f2165 (diff) | |
download | bitbake-35a246fdd156a64831a4cd1ba246b929b18a8215.tar.gz |
Diffstat (limited to 'bin/oe/parse/__init__.py')
-rw-r--r-- | bin/oe/parse/__init__.py | 31 |
1 files changed, 31 insertions, 0 deletions
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 |