From 2d9f32a4051d702e713b61ba17e146af717c8084 Mon Sep 17 00:00:00 2001 From: Xiao Gui Date: Thu, 28 Jul 2022 16:21:50 +0200 Subject: [PATCH] bugfix: set env prior to get token --- ebrains_drive/client.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ebrains_drive/client.py b/ebrains_drive/client.py index ec8130d866..55659fe2a9 100644 --- a/ebrains_drive/client.py +++ b/ebrains_drive/client.py @@ -93,8 +93,8 @@ class DriveApiClient(ClientBase): def __init__(self, username=None, password=None, token=None, env=""): """Wraps various basic operations to interact with seahub http api. """ - super().__init__(username, password, token, env) self._set_env(env) + super().__init__(username, password, token, env) self.server = self.drive_url @@ -128,11 +128,12 @@ def send_request(self, method: str, url: str, *args, **kwargs): class BucketApiClient(ClientBase): def __init__(self, username=None, password=None, token=None, env="") -> None: - super().__init__(username, password, token, env) if env != "": raise NotImplementedError("non prod environment for dataproxy access has not yet been implemented.") - self._set_env(env) + + super().__init__(username, password, token, env) + self.server = "https://data-proxy.ebrains.eu/api" self.buckets = Buckets(self)