Commit 0007833f authored by Janis Streib's avatar Janis Streib

UPD: use logger for errors

parent b15b33a0
import requests
from dataclasses import dataclass
import os
import logging
from .bootstrap_model import APIObject, System, ApiFunction
......@@ -28,8 +30,8 @@ class Loader(object):
base_host=self.api_host,
base_url=self.api_base_url))
if not functions_req.status_code == 200:
print("Fail! Unexpected status_code", functions_req.status_code)
print("Is the NETDB_AUTH environment variable correct?")
logging.fatal(
f"Fail! Unexpected status_code {functions_req.status_code}. Is the NETDB_AUTH environment variable correct?")
exit(1)
func_index = functions_req.json()[0]
self.data_types = {k['name']: k for k in self.sess.get(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment