aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2020-04-11 22:48:18 +0200
committerneodarz <neodarz@neodarz.net>2020-04-11 22:48:18 +0200
commitcb0b33d55855f1dd99b73cb01e2c2af8b6a89d0d (patch)
treee96d5a54000b90782aa1dfaef30e6f540ef0b874
parenta38de79d4daf62e5c2b2b4fae0e7349cdff58d45 (diff)
downloadpyfunkwhale-cb0b33d55855f1dd99b73cb01e2c2af8b6a89d0d.tar.xz
pyfunkwhale-cb0b33d55855f1dd99b73cb01e2c2af8b6a89d0d.zip
Fix double slash in endpoint url
Diffstat (limited to '')
-rw-r--r--pyfunkwhale/client.py3
1 files changed, 3 insertions, 0 deletions
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)