[PR #9186/a863b628 backport][stable-9] fixing broken check mode in the github_key (#9204)
fixing broken check mode in the github_key (#9186)
* fixing datetime.strftime()
* added changelog fragment
* Update changelogs/fragments/9186-fix-broken-check-mode-in-github-key.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit a863b62859
)
Co-authored-by: tomcperry <99128358+tomcperry@users.noreply.github.com>
pull/9211/head
parent
f1cf0c1949
commit
1d9367ebea
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- github_key - in check mode, a faulty call to ```datetime.strftime(...)``` was being made which generated an exception (https://github.com/ansible-collections/community.general/issues/9185).
|
|
@ -162,7 +162,7 @@ def create_key(session, name, pubkey, check_mode):
|
|||
'key': pubkey,
|
||||
'title': name,
|
||||
'url': 'http://example.com/CHECK_MODE_GITHUB_KEY',
|
||||
'created_at': datetime.strftime(now_t, '%Y-%m-%dT%H:%M:%SZ'),
|
||||
'created_at': datetime.datetime.strftime(now_t, '%Y-%m-%dT%H:%M:%SZ'),
|
||||
'read_only': False,
|
||||
'verified': False
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue