diff --git a/corres2math/lists.py b/corres2math/lists.py index 9804ac6..a8cbac2 100644 --- a/corres2math/lists.py +++ b/corres2math/lists.py @@ -1,14 +1,13 @@ import os -from sympasoap import Client - _client = None -def get_sympa_client() -> Client: +def get_sympa_client(): global _client if _client is None: if os.getenv("SYMPA_PASSWORD", None) is not None: + from sympasoap import Client _client = Client("https://" + os.getenv("SYMPA_URL")) _client.login(os.getenv("SYMPA_EMAIL"), os.getenv("SYMPA_PASSWORD")) else: