Commit 5da21fbf authored by Janis Streib's avatar Janis Streib

UPD: cleanup

parent ab02591b
...@@ -22,6 +22,7 @@ class MyEncoder(JSONEncoder): ...@@ -22,6 +22,7 @@ class MyEncoder(JSONEncoder):
@click.option('--token', envvar='NETDB_AUTH') @click.option('--token', envvar='NETDB_AUTH')
def cli(token): def cli(token):
loader.auth = token loader.auth = token
loader.__post_init__()
loader.load() loader.load()
......
import requests import requests
from dataclasses import dataclass from dataclasses import dataclass
import os
import logging import logging
from .bootstrap_model import APIObject, System, ApiFunction from .bootstrap_model import APIObject, System, ApiFunction
...@@ -13,7 +12,7 @@ class Loader(object): ...@@ -13,7 +12,7 @@ class Loader(object):
api_version: str = '3.0' api_version: str = '3.0'
api_base_url: str = f'/api/{api_version}' api_base_url: str = f'/api/{api_version}'
base_dir: str = '' base_dir: str = ''
auth: str = os.getenv('NETDB_AUTH') auth: str = None
sess: requests.Session = requests.Session() sess: requests.Session = requests.Session()
api_functions = None api_functions = None
......
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