Fix crowdin script on newer python versions

This commit is contained in:
DarkPhoenix
2023-11-29 20:16:17 +06:00
parent 28533d60d3
commit 871cf42d88

View File

@@ -19,7 +19,7 @@ params = {
resp = requests.get('https://api.crowdin.com/api/project/pyfa/status', params=params)
data = resp.json()
if resp.status_code is not 200:
if resp.status_code != 200:
print("Error fetching Crowdin progress. Error: {}; {}".format(data['error']['message']))
sys.exit()
@@ -36,4 +36,4 @@ data = {x['canonical_name']: x for x in data}
with open("locale/progress.json", 'w') as file:
file.seek(0)
file.truncate()
json.dump(data, file)
json.dump(data, file)