diff --git a/src/viv/viv.py b/src/viv/viv.py index b4704fa..96afccc 100755 --- a/src/viv/viv.py +++ b/src/viv/viv.py @@ -118,7 +118,7 @@ class Env: ) def __getattr__(self, attr: str) -> Any: - if not attr.startswith("_") and (defined := getattr(self, f"_{attr}")): + if not attr.startswith("_") and (defined:=getattr(self, f"_{attr}")) is not None: return defined else: return os.getenv(attr.upper(), self.defaults.get(attr)) @@ -131,7 +131,6 @@ class Env: def _viv_spec(self) -> List[str]: return [i for i in os.getenv("VIV_SPEC", "").split(" ") if i] - class Cache: def __init__(self) -> None: self.base = Env().viv_cache