Skip to content

Commit

Permalink
Superflous raise client error since it's already handled by self.get
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinBuira committed Dec 3, 2024
1 parent 0850f43 commit 2d521a1
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions mergin/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,16 +343,8 @@ def workspace_service(self, workspace_id):
Returns response from server as JSON dict or None if endpoint is not found
"""

try:
response = self.get(f"/v1/workspace/{workspace_id}/service")
except ClientError as e:
e.extra = f"Unable to query for /workspace/{workspace_id}/service endpoint"
raise e

response = json.loads(response.read())

return response
resp = self.get(f"/v1/workspace/{workspace_id}/service")
return json.loads(resp)

def server_type(self):
"""
Expand Down

0 comments on commit 2d521a1

Please sign in to comment.