From ff0af7cce73ed02ab5b4124be41b2c585c591138 Mon Sep 17 00:00:00 2001 From: blitzmann Date: Sun, 2 Aug 2020 22:25:15 -0400 Subject: [PATCH] Add check to see if crowdin API key is available --- scripts/dump_crowdin_progress.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/dump_crowdin_progress.py b/scripts/dump_crowdin_progress.py index 17c0e58a1..7779947ce 100644 --- a/scripts/dump_crowdin_progress.py +++ b/scripts/dump_crowdin_progress.py @@ -2,8 +2,14 @@ import requests import os import json import wx +import sys -key = os.environ.get("CROWDIN_API_KEY", "") +key = os.environ.get("CROWDIN_API_KEY", None) + +if key is None: + # 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() params = { 'json': '',