fix
This commit is contained in:
parent
f4dfcea203
commit
f43b90c2a5
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user