From cb0b33d55855f1dd99b73cb01e2c2af8b6a89d0d Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Apr 2020 22:48:18 +0200 Subject: Fix double slash in endpoint url --- pyfunkwhale/client.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyfunkwhale/client.py b/pyfunkwhale/client.py index 49df688..c905c57 100644 --- a/pyfunkwhale/client.py +++ b/pyfunkwhale/client.py @@ -2,6 +2,7 @@ # -*- conding: utf-8 -*- import json +import re from time import time from requests_oauthlib import OAuth2Session from requests.models import Response @@ -98,6 +99,8 @@ class Client(object): call = getattr(self.oauth_client, method) + endpoint = re.sub(r'^\/', '', endpoint) + r = call(self.domain + '/api/v1/' + endpoint, headers=headers, params=params, data=data) -- cgit v1.2.1