From 6e8b6fbc6674519e8f15760d0b52bd99bb4a5644 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Fri, 9 Oct 2020 14:18:27 +0200 Subject: [PATCH] sympasoap is not a dependency is test env --- corres2math/lists.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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: