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 | poky-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): | |||
1201 | bb.fatal("Invalid value for 'unpack' parameter for %s: %s" % | 1201 | bb.fatal("Invalid value for 'unpack' parameter for %s: %s" % |
1202 | (file, urldata.parm.get('unpack'))) | 1202 | (file, urldata.parm.get('unpack'))) |
1203 | 1203 | ||
1204 | dots = file.split(".") | 1204 | base, ext = os.path.splitext(file) |
1205 | if dots[-1] in ['gz', 'bz2', 'Z', 'xz', 'lz']: | 1205 | if ext in ['.gz', '.bz2', '.Z', '.xz', '.lz']: |
1206 | efile = os.path.join(rootdir, os.path.basename('.'.join(dots[0:-1]))) | 1206 | efile = os.path.join(rootdir, os.path.basename(base)) |
1207 | else: | 1207 | else: |
1208 | efile = file | 1208 | efile = file |
1209 | cmd = None | 1209 | cmd = None |