mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix pagination issue in community.general.github_deploy_key (#7375)
* Fix pagination issue in community.general.github_deploy_key * Add changelog fragment * Update changelogs/fragments/7375-fix-github-deploy-key-pagination.yml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
cdb19ab8c1
commit
eb4f8d4301
2 changed files with 4 additions and 1 deletions
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
bugfixes:
|
||||||
|
- "github_deploy_key - fix pagination behaviour causing a crash when only a single page of deploy keys exist (https://github.com/ansible-collections/community.general/pull/7375)."
|
|
@ -227,7 +227,7 @@ class GithubDeployKey(object):
|
||||||
yield self.module.from_json(resp.read())
|
yield self.module.from_json(resp.read())
|
||||||
|
|
||||||
links = {}
|
links = {}
|
||||||
for x, y in findall(r'<([^>]+)>;\s*rel="(\w+)"', info["link"]):
|
for x, y in findall(r'<([^>]+)>;\s*rel="(\w+)"', info.get("link", '')):
|
||||||
links[y] = x
|
links[y] = x
|
||||||
|
|
||||||
url = links.get('next')
|
url = links.get('next')
|
||||||
|
|
Loading…
Reference in a new issue