diff --git a/nginx/nginx-dev/prepare.py b/nginx/nginx-dev/prepare.py index 13db5f2..4966450 100644 --- a/nginx/nginx-dev/prepare.py +++ b/nginx/nginx-dev/prepare.py @@ -14,13 +14,12 @@ minio_client = Minio( def get(url): with urlopen('https://example.com') as response: - data = response.read() + data = response.read().decode('utf-8') return loads(data) try: response = get('http://configurator/api/v1/fetch?project=certupdater&stage=development') - response.raise_for_status() # Raises an exception for HTTP errors - hosts = response.json()['configs']['hosts'] + hosts = response['configs']['hosts'] except Exception as e: print(f"Error fetching config: {e}", file=sys.stderr) sys.exit(1)