aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2020-04-11 18:41:37 +0200
committerneodarz <neodarz@neodarz.net>2020-04-11 18:41:37 +0200
commit1f53a3aced63f61a183ea555ef6ace3388d078b5 (patch)
treed9d66ba90ec4ab527c8cc0b2b587693dbe0a3390
parent05572298b8e59972ac5439f4d435d67b8714ab19 (diff)
downloadpyfunkwhale-1f53a3aced63f61a183ea555ef6ace3388d078b5.tar.xz
pyfunkwhale-1f53a3aced63f61a183ea555ef6ace3388d078b5.zip
Separate uri parameter and params parameter
Diffstat (limited to '')
-rw-r--r--pyfunkwhale/funkwhale.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/pyfunkwhale/funkwhale.py b/pyfunkwhale/funkwhale.py
index 79e9c65..bca346a 100644
--- a/pyfunkwhale/funkwhale.py
+++ b/pyfunkwhale/funkwhale.py
@@ -14,9 +14,14 @@ class Funkwhale(object):
token_endpoint, token_filename)
def _build_params(self, arguments):
+ """
+ Build params dict for python-requests. Not that all key who start
+ with an underscore are treated as par of the uri and are not in
+ the params dict.
+ """
params = {}
for k, v in arguments.items():
- if k != 'self' and v is not None:
+ if k != 'self' and v is not None and not k.startswith("_"):
params[k] = v
return params