Skip to content

Commit

Permalink
bugfix: set env prior to get token
Browse files Browse the repository at this point in the history
  • Loading branch information
xgui3783 authored and Cracky5457 committed Aug 15, 2022
1 parent 96274b8 commit 2d9f32a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ebrains_drive/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 2d9f32a

Please sign in to comment.