Don't use <x> if <y> else <z> syntax
This commit is contained in:
parent
c5b9bda656
commit
3c8d788c11
1 changed files with 5 additions and 1 deletions
|
@ -223,7 +223,11 @@ def main():
|
||||||
if os.path.isdir(path) and not path.endswith(os.sep + '.'):
|
if os.path.isdir(path) and not path.endswith(os.sep + '.'):
|
||||||
basename = os.path.basename(path) + os.sep
|
basename = os.path.basename(path) + os.sep
|
||||||
|
|
||||||
archive.add(path, path[len(arcroot):], filter=lambda f: f if f.name != creates else None)
|
filter_create = lambda f:
|
||||||
|
if filecmp.cmp(f.name, creates):
|
||||||
|
return f
|
||||||
|
|
||||||
|
archive.add(path, path[len(arcroot):], filter=filter_create)
|
||||||
successes.append(path)
|
successes.append(path)
|
||||||
|
|
||||||
# Slightly more difficult (and less efficient!) compression using zipfile module
|
# Slightly more difficult (and less efficient!) compression using zipfile module
|
||||||
|
|
Loading…
Reference in a new issue