Fix shinanigans with the API

This commit is contained in:
Théophile Diot 2023-06-06 12:01:16 -04:00
parent 5deeacc3d4
commit 718310312a
No known key found for this signature in database
GPG key ID: E752C80DB72BB014
2 changed files with 2 additions and 2 deletions

View file

@ -41,7 +41,7 @@ class API:
resp = request(
method,
f"{self.__endpoint}{url}",
f"{self.__endpoint}{url if not url.startswith('/') else url[1:]}",
timeout=timeout,
headers={"User-Agent": "bwapi", "Host": self.__host},
**kwargs,

View file

@ -22,7 +22,7 @@ from kubernetes import client as kube_client, config
class ApiCaller:
def __init__(self, apis: List[API] = None):
def __init__(self, apis: Optional[List[API]] = None):
self.__apis = apis or []
self.__logger = setup_logger("Api", getenv("LOG_LEVEL", "INFO"))