Update Zanata script for Python 3.5

Python 3.5 - unlike Python 3.6 - does not accept byte strings in
json.loads, so convert from bytes to string first.

This is needed now since the script is run under python3.5 and not anymore
using python 2.7.

Change-Id: Ie223ab715d6f1c2d77344a9bcc3d3885c3be85c7
This commit is contained in:
Andreas Jaeger 2020-01-06 16:48:29 +01:00
parent 1d69d3a690
commit 38aabd672c
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ def main():
except ValueError:
sys.exit(1)
if r.status_code == 200:
details = json.loads(r.content)
details = json.loads(r.content.decode('utf-8'))
if details['status'] == 'READONLY':
sys.exit(1)
sys.exit(0)