diff options
author | Michael DeHaan <michael.dehaan@gmail.com> | 2014-08-04 21:18:46 -0400 |
---|---|---|
committer | Michael DeHaan <michael.dehaan@gmail.com> | 2014-08-04 21:18:46 -0400 |
commit | 4e6685d77297a85565650abd630e6cda536643bb (patch) | |
tree | a9b5cde8d74c502bfa55016a550a90938d20f6bb | |
parent | 8646cc798897dd74055f509c2a9050b2dba4e42e (diff) | |
parent | 150feb69d4aece64f4a8152659093ad1422632dd (diff) | |
download | ansible-4e6685d77297a85565650abd630e6cda536643bb.tar.gz |
Merge pull request #8442 from Jmainguy/rpm_key_8424
Removed max 8192 bytes, fixes #8424
-rw-r--r-- | library/packaging/rpm_key | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/library/packaging/rpm_key b/library/packaging/rpm_key index d8530f9206..f132d55250 100644 --- a/library/packaging/rpm_key +++ b/library/packaging/rpm_key @@ -65,10 +65,6 @@ import os.path import re import tempfile -# Attempt to download at most 8192 bytes. -# Should be more than enough for all keys -MAXBYTES = 8192 - def is_pubkey(string): """Verifies if string is a pubkey""" pgp_regex = ".*?(-----BEGIN PGP PUBLIC KEY BLOCK-----.*?-----END PGP PUBLIC KEY BLOCK-----).*" @@ -118,11 +114,11 @@ class RpmKey: module.exit_json(changed=False) - def fetch_key(self, url, maxbytes=MAXBYTES): + def fetch_key(self, url): """Downloads a key from url, returns a valid path to a gpg key""" try: rsp, info = fetch_url(self.module, url) - key = rsp.read(maxbytes) + key = rsp.read() if not is_pubkey(key): self.module.fail_json(msg="Not a public key: %s" % url) tmpfd, tmpname = tempfile.mkstemp() |