Skip to content

Commit 2d9f32a

Browse files
xgui3783amdev74
authored andcommitted
bugfix: set env prior to get token
1 parent 96274b8 commit 2d9f32a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ebrains_drive/client.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ class DriveApiClient(ClientBase):
9393
def __init__(self, username=None, password=None, token=None, env=""):
9494
"""Wraps various basic operations to interact with seahub http api.
9595
"""
96-
super().__init__(username, password, token, env)
9796
self._set_env(env)
97+
super().__init__(username, password, token, env)
9898

9999
self.server = self.drive_url
100100

@@ -128,11 +128,12 @@ def send_request(self, method: str, url: str, *args, **kwargs):
128128
class BucketApiClient(ClientBase):
129129

130130
def __init__(self, username=None, password=None, token=None, env="") -> None:
131-
super().__init__(username, password, token, env)
132131
if env != "":
133132
raise NotImplementedError("non prod environment for dataproxy access has not yet been implemented.")
134-
135133
self._set_env(env)
134+
135+
super().__init__(username, password, token, env)
136+
136137
self.server = "https://data-proxy.ebrains.eu/api"
137138

138139
self.buckets = Buckets(self)

0 commit comments

Comments
 (0)