mirror of
https://git.yoctoproject.org/poky
synced 2026-02-05 16:28:43 +01:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
f0d5edc91e
commit
9a51fb39db
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user