mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
[PR #7375/eb4f8d43 backport][stable-6] Fix pagination issue in community.general.github_deploy_key (#7407)
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>
(cherry picked from commit eb4f8d4301
)
Co-authored-by: Padraic Calpin <padraic.calpin93@gmail.com>
This commit is contained in:
parent
94bb204e29
commit
d9ed00fb12
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