File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -65,10 +65,6 @@ import os.path
6565import re
6666import tempfile
6767
68- # Attempt to download at most 8192 bytes.
69- # Should be more than enough for all keys
70- MAXBYTES = 8192
71-
7268def is_pubkey (string ):
7369 """Verifies if string is a pubkey"""
7470 pgp_regex = ".*?(-----BEGIN PGP PUBLIC KEY BLOCK-----.*?-----END PGP PUBLIC KEY BLOCK-----).*"
@@ -118,11 +114,11 @@ class RpmKey:
118114 module .exit_json (changed = False )
119115
120116
121- def fetch_key (self , url , maxbytes = MAXBYTES ):
117+ def fetch_key (self , url ):
122118 """Downloads a key from url, returns a valid path to a gpg key"""
123119 try :
124120 rsp , info = fetch_url (self .module , url )
125- key = rsp .read (maxbytes )
121+ key = rsp .read ()
126122 if not is_pubkey (key ):
127123 self .module .fail_json (msg = "Not a public key: %s" % url )
128124 tmpfd , tmpname = tempfile .mkstemp ()
You can’t perform that action at this time.
0 commit comments