diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2010-11-14 13:08:03 +0100 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2010-11-15 16:28:10 +0100 |
commit | 858d704d713d15bf97053eb1374758c74b0d8874 (patch) | |
tree | 8a7be013d300d0e448b587bc33793e5d27bc43b4 /lib/bb/parse | |
parent | de34a403e206867e09410ad4925c7b9cff04fee6 (diff) | |
download | bitbake-858d704d713d15bf97053eb1374758c74b0d8874.tar.gz |
BBHandler: simplify supports()
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'lib/bb/parse')
-rw-r--r-- | lib/bb/parse/parse_py/BBHandler.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bb/parse/parse_py/BBHandler.py b/lib/bb/parse/parse_py/BBHandler.py index bda6acc94..ebc2d5aeb 100644 --- a/lib/bb/parse/parse_py/BBHandler.py +++ b/lib/bb/parse/parse_py/BBHandler.py @@ -65,7 +65,8 @@ IN_PYTHON_EOF = -9999999999999 def supports(fn, d): - return fn[-3:] == ".bb" or fn[-8:] == ".bbclass" or fn[-4:] == ".inc" + """Return True if fn has a supported extension""" + return os.path.splitext(fn)[-1] in [".bb", ".bbclass", ".inc"] def inherit(files, d): __inherit_cache = data.getVar('__inherit_cache', d) or [] |