From 518b4abf8c54a0ff1ae1c5da7c767cf0374a19d8 Mon Sep 17 00:00:00 2001 From: blitzmann Date: Wed, 23 Mar 2022 22:55:22 -0400 Subject: [PATCH] fix crowdin error for PRs --- scripts/dump_crowdin_progress.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/dump_crowdin_progress.py b/scripts/dump_crowdin_progress.py index 17d3d7cdd..c7d50032f 100644 --- a/scripts/dump_crowdin_progress.py +++ b/scripts/dump_crowdin_progress.py @@ -6,7 +6,7 @@ import sys key = os.environ.get("CROWDIN_API_KEY", None) -if key is None: +if key is None or key == '': # if building from a forked PR, this is normal. Secret veariables are generally unavailable in those circumstances print("CROWDIN_API_KEY env variable not found, cannot fetch translation status.") sys.exit() @@ -20,7 +20,7 @@ resp = requests.get('https://api.crowdin.com/api/project/pyfa/status', params=pa data = resp.json() if resp.status_code is not 200: - print("Error fetching Crowdin progress. Error: {}; {}".format(data['error']['message'], key[-3:])) + print("Error fetching Crowdin progress. Error: {}; {}".format(data['error']['message'])) sys.exit() for x in data: