diff --git a/setup.py b/setup.py index 41c535a..7497e06 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="CVAT wrapper", - version="0.0.18", + version="1.0.0", author="antwxne", author_email="antoine.desruet@epitech.eu", description="Python wrapper for CVAT API", diff --git a/src/CVAT/__init__.py b/src/CVAT/__init__.py index cea4a1d..840fc2c 100644 --- a/src/CVAT/__init__.py +++ b/src/CVAT/__init__.py @@ -34,8 +34,6 @@ def __init__(self, username: str = "admin", password: str = "admin", url: str = } response: Response = self.session.post(url=f'{self.url}/api/auth/login', json=body) - self.session.headers = {"Authorization": f'Token {response.json()["key"]}'} if response.status_code != 200: raise ValueError("Bad credentials") - - + self.session.headers = {"Authorization": f'Token {response.json()["key"]}'}