[FIX] tools: strip i18n-overwrite from gevent parameters

When gevent is enabled, some arguments are stripped to avodi being retriggered
in the other workers (e.g. update of a module).
The `--i18n-overwrite` was not stripped and the other worker raised an error has
the `overwrite_existing_translations` argument requires the `update` argument
(which is stripped in the `stripped_sys_argv` method.

Fixes #12566
Closes #12986
This commit is contained in:
Bruno PLANCHER
2016-08-03 16:33:27 +02:00
committed by Martin Trigaux
parent 59eadac840
commit f5e803c025
+1 -1
View File
@@ -984,7 +984,7 @@ class CountingStream(object):
def stripped_sys_argv(*strip_args):
"""Return sys.argv with some arguments stripped, suitable for reexecution or subprocesses"""
strip_args = sorted(set(strip_args) | set(['-s', '--save', '-u', '--update', '-i', '--init']))
strip_args = sorted(set(strip_args) | set(['-s', '--save', '-u', '--update', '-i', '--init', '--i18n-overwrite']))
assert all(config.parser.has_option(s) for s in strip_args)
takes_value = dict((s, config.parser.get_option(s).takes_value()) for s in strip_args)