Commit 9e4b84cb authored by Cyril Brulebois's avatar Cyril Brulebois
Browse files

lint_po: get rid of an obsolete temporary directory (refs: #17359).

This wasn't tidied up in earlier commits to make sure the revert (in the
previous commit) would apply cleanly, but there's of course no need to
keep creating this temporary directory.

[ Due to indentation changes, use -b/-w to double check this commit. ]
parent 34bb0b27
......@@ -322,24 +322,24 @@ def main(logger) -> None:
fine = True
# check only the headers
pool = multiprocessing.Pool()
with tempfile.TemporaryDirectory() as tmpXDGCacheHome:
# The environment is no longer set here, but let's keep the
# signatures unchanged, in case we need to tweak some more
# things later on:
i18nspector_env = {}
_check_po_file = functools.partial(check_po_file,
extended=args.extended,
i18nspector_env=i18nspector_env)
for fname, issues in pool.imap_unordered(_check_po_file,
files, 10):
if issues:
fine = False
# indent sub-issues:
issues = [i.replace("\n", "\n\t") for i in issues]
logger.error("{fname}:\n\t{issues}"
.format(fname=fname, issues="\n\t".join(issues)))
else:
logger.debug("{fname} - No issue found.".format(fname=fname))
# The environment is no longer set here, but let's keep the
# signatures unchanged, in case we need to tweak some more
# things later on:
i18nspector_env = {}
_check_po_file = functools.partial(check_po_file,
extended=args.extended,
i18nspector_env=i18nspector_env)
for fname, issues in pool.imap_unordered(_check_po_file,
files, 10):
if issues:
fine = False
# indent sub-issues:
issues = [i.replace("\n", "\n\t") for i in issues]
logger.error("{fname}:\n\t{issues}"
.format(fname=fname, issues="\n\t".join(issues)))
else:
logger.debug("{fname} - No issue found.".format(fname=fname))
if not fine:
sys.exit("checked files are not clean.")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment