Update rpm_key.py

pull/83336/head
Pablo Casillas 5 months ago committed by GitHub
parent b2b0abe74f
commit 219ee32bba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -151,7 +151,7 @@ class RpmKey(object):
def fetch_key(self, url):
"""Downloads a key from url, returns a valid path to a gpg key"""
rsp, info = fetch_url(self.module, url)
if info['status'] != 200 and not url.startswith('file:/') and not (url.startswith('ftp:/') and info.get('msg', '').startswith('OK')):
if info['status'] != 200 and not (url.startswith('ftp:/') and info.get('msg', '').startswith('OK')):
self.module.fail_json(msg="failed to fetch key at %s , error was: %s" % (url, info['msg']))
key = rsp.read()

Loading…
Cancel
Save