Commit 206f9a5d authored by unknown's avatar unknown
Browse files

no loger pass registry and staging as separate kwarg arguments

parent 3d684c94
...@@ -42,14 +42,11 @@ class BuildingGeneric: ...@@ -42,14 +42,11 @@ class BuildingGeneric:
def __init__(self, uid: str = None, **kwargs) -> None: def __init__(self, uid: str = None, **kwargs) -> None:
staging = kwargs.get("staging", False)
registry = kwargs.get("registry")
self.logger = logging.getLogger(self.__class__.__name__) self.logger = logging.getLogger(self.__class__.__name__)
self._uid = uid self._uid = uid
self._building = None self._building = None
self.settings = Settings(staging=staging, registry=registry, **kwargs) self.settings = Settings(**kwargs)
if self._uid: if self._uid:
self.fetch(timeout=kwargs.get("timeout", None)) self.fetch(timeout=kwargs.get("timeout", None))
......
...@@ -7,6 +7,9 @@ class Settings: ...@@ -7,6 +7,9 @@ class Settings:
"""Settings for BKC communication""" """Settings for BKC communication"""
def __init__(self, staging: bool = False, registry=None, **kwargs) -> None: def __init__(self, staging: bool = False, registry=None, **kwargs) -> None:
staging = kwargs.get("staging", False)
registry = kwargs.get("registry")
if not registry: if not registry:
registry = MaxIcsRegistry.from_env(staging=staging) registry = MaxIcsRegistry.from_env(staging=staging)
......
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