diff options
| author | John L. Villalovos <john@sodarock.com> | 2022-08-04 08:20:26 -0700 |
|---|---|---|
| committer | John L. Villalovos <john@sodarock.com> | 2022-08-04 08:20:26 -0700 |
| commit | 6d1b62d4b248c4c021a59cd234c3a2b19e6fad07 (patch) | |
| tree | 9485d56dc23fde872124ad6b0debc24ce8872de6 | |
| parent | d263f57a34a58d44531e3abbdbfedf354b0c70ca (diff) | |
| download | gitlab-6d1b62d4b248c4c021a59cd234c3a2b19e6fad07.tar.gz | |
chore: use `urlunparse` instead of string replace
Use the `urlunparse()` function to reconstruct the URL without the
query parameters.
| -rw-r--r-- | gitlab/client.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gitlab/client.py b/gitlab/client.py index b3223e5..e3290e1 100644 --- a/gitlab/client.py +++ b/gitlab/client.py @@ -685,7 +685,7 @@ class Gitlab: params = parse.parse_qs(parsed.query) utils.copy_dict(src=query_data, dest=params) - url = raw_url.replace(parsed.query, "").strip("?") + url = parse.urlunparse(parsed._replace(query="")) # Deal with kwargs: by default a user uses kwargs to send data to the # gitlab server, but this generates problems (python keyword conflicts |
