mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-02-14 23:01:21 +00:00
sympasoap is not a dependency is test env
This commit is contained in:
parent
d62cb40acd
commit
6e8b6fbc66
@ -1,14 +1,13 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from sympasoap import Client
|
|
||||||
|
|
||||||
_client = None
|
_client = None
|
||||||
|
|
||||||
|
|
||||||
def get_sympa_client() -> Client:
|
def get_sympa_client():
|
||||||
global _client
|
global _client
|
||||||
if _client is None:
|
if _client is None:
|
||||||
if os.getenv("SYMPA_PASSWORD", None) is not None:
|
if os.getenv("SYMPA_PASSWORD", None) is not None:
|
||||||
|
from sympasoap import Client
|
||||||
_client = Client("https://" + os.getenv("SYMPA_URL"))
|
_client = Client("https://" + os.getenv("SYMPA_URL"))
|
||||||
_client.login(os.getenv("SYMPA_EMAIL"), os.getenv("SYMPA_PASSWORD"))
|
_client.login(os.getenv("SYMPA_EMAIL"), os.getenv("SYMPA_PASSWORD"))
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user