summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNejc Habjan <nejc.habjan@siemens.com>2022-08-03 17:22:20 +0200
committerJohn Villalovos <john@sodarock.com>2022-08-04 09:42:00 -0700
commit77c04b1acb2815290bcd6f50c37d75329409e9d3 (patch)
treeb95eac3cd0cefdedbcae119751f61641768dd49d
parent9e0b60fb36c64d57c14926c0801ecf91215707bf (diff)
downloadgitlab-77c04b1acb2815290bcd6f50c37d75329409e9d3.tar.gz
refactor(client): remove handling for incorrect link header
This was a quirk only present in GitLab 13.0 and fixed with 13.1. See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/33714 and https://gitlab.com/gitlab-org/gitlab/-/issues/218504 for more context.
-rw-r--r--gitlab/client.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/gitlab/client.py b/gitlab/client.py
index e3290e1..db2ace5 100644
--- a/gitlab/client.py
+++ b/gitlab/client.py
@@ -1135,13 +1135,8 @@ class GitlabList:
query_data = query_data or {}
result = self._gl.http_request("get", url, query_data=query_data, **kwargs)
try:
- links = result.links
- if links:
- next_url = links["next"]["url"]
- else:
- next_url = requests.utils.parse_header_links(result.headers["links"])[
- 0
- ]["url"]
+ next_url = result.links["next"]["url"]
+
# if the next url is different with user provided server URL
# then give a warning it may because of misconfiguration
# but if the option to fix provided then just reconstruct it