diff options
author | Ross Burton <ross.burton@intel.com> | 2015-01-16 17:53:23 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-01-21 14:37:39 +0000 |
commit | 9a51fb39dbde61baae5bf9094bbb1924bcfffd0a (patch) | |
tree | d2a9980f2c2a0b70cf4f7af5611c1cea45b548bc /bitbake/lib/bb/fetch2 | |
parent | f0d5edc91eed3fac7ba04ac75f7584a9e186c138 (diff) | |
download | openembedded-core-contrib-9a51fb39dbde61baae5bf9094bbb1924bcfffd0a.tar.gz |
bitbake: fetcher: use os.path.splitext() instead of string.split()
(Bitbake rev: 1689edd35477a126bfbf4bd3257c4f1f9e16f20d)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index f97eaf4399..599ea8c822 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py @@ -1201,9 +1201,9 @@ class FetchMethod(object): bb.fatal("Invalid value for 'unpack' parameter for %s: %s" % (file, urldata.parm.get('unpack'))) - dots = file.split(".") - if dots[-1] in ['gz', 'bz2', 'Z', 'xz', 'lz']: - efile = os.path.join(rootdir, os.path.basename('.'.join(dots[0:-1]))) + base, ext = os.path.splitext(file) + if ext in ['.gz', '.bz2', '.Z', '.xz', '.lz']: + efile = os.path.join(rootdir, os.path.basename(base)) else: efile = file cmd = None |