master #84

Merged
emmatveev merged 9 commits from master into prod 2025-06-12 01:13:28 +03:00
Showing only changes of commit f43b90c2a5 - Show all commits

View File

@ -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)