Commit 34bb0b27 authored by Cyril Brulebois's avatar Cyril Brulebois
Browse files

Revert "Fix race condition of $XDG_CACHE_HOME/rply creation." (refs: #17359).

This reverts commit c957b5b8.

With the new approach (implemented two commits ago), a cache directory
is created for each i18nspector call. This means that we don't need to
treat the first file specifically (which wasn't working, depending on
which file that was).

As a result, the code can be simplified, getting back to the previous
“treat all files the same way” implementation.
parent 542bdf10
......@@ -330,15 +330,8 @@ def main(logger) -> None:
_check_po_file = functools.partial(check_po_file,
# As we start 10 i18nspector instances, we run into a race
# condition, as all try to create $XDG_CACHE_HOME/rply, that's why
# we check the file before the others. see #17359#note-14
iterator = iter(files)
chain = [(_check_po_file(next(iterator)),),
pool.imap_unordered(_check_po_file,iterator, 10)]
for fname, issues in itertools.chain.from_iterable(chain):
for fname, issues in pool.imap_unordered(_check_po_file,
files, 10):
if issues:
fine = False
# indent sub-issues:
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