From 46eb3cdaef31fd1bba00d37ce6e4a170f1d59311 Mon Sep 17 00:00:00 2001 From: JunXiang Date: Thu, 2 Nov 2023 11:10:20 +0800 Subject: [PATCH] Avoid deleted README be trans --- translation.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/translation.py b/translation.py index 8ead1e2..0d6749e 100644 --- a/translation.py +++ b/translation.py @@ -103,6 +103,10 @@ async def main(): prefix_path = extract_prefix(file) + if not os.path.exists(file): + print(f'{file} was delete in this commit') + continue + with open(file, "r", encoding="utf-8") as f: content = f.read()