From 1f53a3aced63f61a183ea555ef6ace3388d078b5 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Apr 2020 18:41:37 +0200 Subject: Separate uri parameter and params parameter --- pyfunkwhale/funkwhale.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- cgit v1.2.1