mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
This commit is contained in:
parent
352d280058
commit
08ce50c2b3
1 changed files with 2 additions and 0 deletions
|
@ -225,6 +225,8 @@ def fetch_rpm_from_url(spec, module=None):
|
||||||
package = os.path.join(tempdir, str(spec.rsplit('/', 1)[1]))
|
package = os.path.join(tempdir, str(spec.rsplit('/', 1)[1]))
|
||||||
try:
|
try:
|
||||||
rsp, info = fetch_url(module, spec)
|
rsp, info = fetch_url(module, spec)
|
||||||
|
if not rsp:
|
||||||
|
module.fail_json(msg="Failure downloading %s, %s" % (spec, info['msg']))
|
||||||
f = open(package, 'w')
|
f = open(package, 'w')
|
||||||
data = rsp.read(BUFSIZE)
|
data = rsp.read(BUFSIZE)
|
||||||
while data:
|
while data:
|
||||||
|
|
Loading…
Reference in a new issue