From 0fb06ffcf88b770479d0c74d05a2c551b098c525 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Mar 10 2020 16:08:39 +0000 Subject: Make the script run on python 3.6 (aka, EL 7) Since capture_output is only on 3.7, we need to find another way to detect we have to commit something --- diff --git a/build.py b/build.py index 5729677..e16c3b8 100755 --- a/build.py +++ b/build.py @@ -113,7 +113,7 @@ def commit_translated_source(): subprocess.run(['git', 'add', '.'], check=True, cwd=repo_dir) - out = subprocess.run(['git', 'status', '--porcelain'], check=True, cwd=repo_dir, capture_output=True) + out = subprocess.run(['git', 'status', '--porcelain'], check=True, cwd=repo_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) if out.stdout.decode("utf-8") : subprocess.run(["git", "commit", "-m", "automatic update of translated content"], @@ -144,7 +144,7 @@ def commit_l10n(repo_name): subprocess.run(['git', 'add', '.'], check=True, cwd=repo_dir) - out = subprocess.run(['git', 'status', '--porcelain'], check=True, cwd=repo_dir, capture_output=True) + out = subprocess.run(['git', 'status', '--porcelain'], check=True, cwd=repo_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) if out.stdout.decode("utf-8") : subprocess.run(["git", "commit", "-m", "automatic update of pot/po files"],