changed gen-set.py (using lang Thx @gu3)

This commit is contained in:
Stefan 2022-03-05 20:52:54 +01:00
commit ab3fb67324

View file

@ -250,7 +250,7 @@ def is_scummvmicons_repo(output_showorigin: list) -> bool:
""" Checks if the local repo is a scummvm-icons repo""" """ Checks if the local repo is a scummvm-icons repo"""
for line in output_showorigin: for line in output_showorigin:
# should be the correct repo # should be the correct repo
if ': https://github.com/scummvm/scummvm-icons' in line.decode(ENCODING): if 'Fetch URL: https://github.com/scummvm/scummvm-icons' in line.decode(ENCODING):
return True return True
return False return False
@ -347,8 +347,10 @@ def write_iconsdat(changed_files: list) -> str:
def run_git(*args): def run_git(*args):
my_env = os.environ.copy()
env["LANG"] = "C"
""" Executes a git command and returns the stdout (as line[])""" """ Executes a git command and returns the stdout (as line[])"""
with subprocess.Popen(args=['git'] + list(args), stdout=subprocess.PIPE) as child_proc: with subprocess.Popen(args=['git'] + list(args), stdout=subprocess.PIPE, env=my_env) as child_proc:
return child_proc.stdout.readlines() return child_proc.stdout.readlines()
########### ###########