mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
gitweb: tests: functional: Fix test failures in localized environment
Closes #2005 Signed-off-by: Veiko Aasa <veiko17@disroot.org> Reviewed-by: Fioddor Superconcentrado <fioddor@gmail.com>
This commit is contained in:
parent
2317239d8d
commit
7cf166e558
@ -288,7 +288,11 @@ def _gitweb_temp_directory():
|
|||||||
|
|
||||||
def _gitweb_git_command_is_successful(command, cwd):
|
def _gitweb_git_command_is_successful(command, cwd):
|
||||||
"""Check if a command runs successfully or gives authentication error"""
|
"""Check if a command runs successfully or gives authentication error"""
|
||||||
process = subprocess.run(command, capture_output=True, cwd=cwd)
|
# Tell OS not to translate command return messages
|
||||||
|
env = os.environ.copy()
|
||||||
|
env['LC_ALL'] = 'C'
|
||||||
|
|
||||||
|
process = subprocess.run(command, capture_output=True, cwd=cwd, env=env)
|
||||||
if process.returncode != 0:
|
if process.returncode != 0:
|
||||||
if 'Authentication failed' in process.stderr.decode():
|
if 'Authentication failed' in process.stderr.decode():
|
||||||
return False
|
return False
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user