diff options
author | Stefan Sauer <ensonic@hora-obscura.de> | 2019-07-14 16:41:37 +0000 |
---|---|---|
committer | Stefan Sauer <ensonic@hora-obscura.de> | 2019-07-14 16:41:37 +0000 |
commit | 9af81b409dc2789f1bc4204024d2c0c7a2810c3a (patch) | |
tree | 28f813d598673ef649efcee9b657b84cf274df12 | |
parent | 58094106b0e41dec2414f6318d13c0e8381ac10e (diff) | |
parent | 16f365f002c6540d4e04df2b945ea58c832206e7 (diff) | |
download | gtk-doc-9af81b409dc2789f1bc4204024d2c0c7a2810c3a.tar.gz |
Merge branch 'wip/lantw/scangobj-reset-locale-environment-variables-before-running' into 'master'
scangobj: reset locale environment variables before running
See merge request GNOME/gtk-doc!31
-rw-r--r-- | gtkdoc/scangobj.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gtkdoc/scangobj.py b/gtkdoc/scangobj.py index 5c604fb..683634a 100644 --- a/gtkdoc/scangobj.py +++ b/gtkdoc/scangobj.py @@ -1187,14 +1187,14 @@ MAIN_CODE_END = """ """ -def execute_command(options, description, command): +def execute_command(options, description, command, env=None): if options.verbose: call = subprocess.check_call else: call = subprocess.check_output try: - call(command) + call(command, env=env) except subprocess.CalledProcessError as e: logging.warning('%s scanner failed: %d, command: %s', description, e.returncode, ' '.join(command)) @@ -1306,8 +1306,12 @@ def run(options): if res: return res + run_env = os.environ.copy() + run_env['LC_MESSAGES'] = 'C' + run_env.pop('LC_ALL', None) res = execute_command(options, 'Running', - shlex.split(options.run) + ['./' + x_file]) + shlex.split(options.run) + ['./' + x_file], + env=run_env) if res: return res |