Update rpm_key.py

pull/83336/head
Pablo Casillas 2 years 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): def fetch_key(self, url):
"""Downloads a key from url, returns a valid path to a gpg key""" """Downloads a key from url, returns a valid path to a gpg key"""
rsp, info = fetch_url(self.module, url) 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'])) self.module.fail_json(msg="failed to fetch key at %s , error was: %s" % (url, info['msg']))
key = rsp.read() key = rsp.read()

Loading…
Cancel
Save