diff options
author | Jan Klass <kissaki@posteo.de> | 2021-03-08 01:25:42 +0300 |
---|---|---|
committer | Jan Klass <kissaki@posteo.de> | 2021-03-08 20:55:27 +0300 |
commit | b6b5b6fb1259f9379c800eeb65d948fdd14c549c (patch) | |
tree | a9ccd6631c1f3517072fe7d6f8da49d1cc32e877 /scripts/updatetranslations.py | |
parent | 63a86c421c265f2fbcfeb4f8050db15f42c5fc6b (diff) |
MAINT: Fix output on git command failures in updatetranslations.py
The previous code caused exceptions if git returned an error code.
Diffstat (limited to 'scripts/updatetranslations.py')
-rwxr-xr-x | scripts/updatetranslations.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/updatetranslations.py b/scripts/updatetranslations.py index 618e2f91e..af66b26ef 100755 --- a/scripts/updatetranslations.py +++ b/scripts/updatetranslations.py @@ -35,18 +35,18 @@ def CheckForGitHasTsFileChanges(tsfiles: list) -> bool: def Commit(tsfiles: list) -> None: res = subprocess.run(["git", "reset", '--mixed'], capture_output=True) if res.returncode != 0: - logging.error('The git reset call returned an error status code ' + res.returncode) - logging.debug('stdout: ' + res.stdout) + logging.error('The git reset call returned an error status code %d', res.returncode)
+ logging.debug('stdout: %s', res.stdout)
exit(1) res = subprocess.run(["git", "add"] + tsfiles, capture_output=True) if res.returncode != 0: - logging.error('The git add call returned an error status code ' + res.returncode) - logging.debug('stdout: ' + res.stdout) + logging.error('The git add call returned an error status code %d', res.returncode)
+ logging.debug('stdout: %s', res.stdout)
exit(1) res = subprocess.run(["git", "commit", '-m', 'TRANSLATION: Update translation files'], capture_output=True) if res.returncode != 0: - logging.error('The git commit call returned an error status code ' + res.returncode) - logging.debug('stdout: ' + res.stdout) + logging.error('The git commit call returned an error status code %d', res.returncode)
+ logging.debug('stdout: %s', res.stdout)
exit(1) def Update(lupdatebin, tsfile: str, debuglupdate: bool) -> (int, int, int): |