Skip to content

Commit 328a9d1

Browse files
committed
handle exception
1 parent 87ba01e commit 328a9d1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/translator.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ def commit_and_push(translate_files, branch):
102102
# Print stdout and stderr (if any)
103103
if result.stdout:
104104
print(f"STDOUT for {cmd}:\n{result.stdout}")
105+
if "nothing to commit" in result.stdout.lower():
106+
print("Nothing to commit, leaving")
107+
exit(0)
108+
105109
if result.stderr:
106110
print(f"STDERR for {cmd}:\n{result.stderr}")
107111

0 commit comments

Comments
 (0)