mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-09 00:40:11 +01:00
More pythonic tarexc function
This commit is contained in:
parent
0600044f3a
commit
eb2d9326af
@ -450,10 +450,7 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
||||
tarname = common.getsrcname(app,thisbuild)
|
||||
tarball = tarfile.open(os.path.join(tmp_dir, tarname), "w:gz")
|
||||
def tarexc(f):
|
||||
for vcs_dir in ['.svn', '.git', '.hg', '.bzr']:
|
||||
if f.endswith(vcs_dir):
|
||||
return True
|
||||
return False
|
||||
return any(f.endswith(s) for s in ['.svn', '.git', '.hg', '.bzr'])
|
||||
tarball.add(build_dir, tarname, exclude=tarexc)
|
||||
tarball.close()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user