From b44100eafc76c0535d694a75bd5e195d5d6016b0 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Sun, 14 Nov 2010 13:08:03 +0100 Subject: BBHandler: simplify supports() (Bitbake rev: 858d704d713d15bf97053eb1374758c74b0d8874) Signed-off-by: Bernhard Reutner-Fischer Signed-off-by: Richard Purdie --- bitbake/lib/bb/parse/parse_py/BBHandler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bitbake/lib/bb/parse') diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py index 31f44f7df3..ac981b8346 100644 --- a/bitbake/lib/bb/parse/parse_py/BBHandler.py +++ b/bitbake/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 [] -- cgit v1.2.3-54-g00ecf