This commit is contained in:
parent
55d51b3946
commit
ab7fe884d7
1 changed files with 1 additions and 1 deletions
|
@ -228,7 +228,7 @@ def url_get(module, url, dest, use_proxy, last_mod_time, force, timeout=10, head
|
||||||
module.exit_json(url=url, dest=dest, changed=False, msg=info.get('msg', ''))
|
module.exit_json(url=url, dest=dest, changed=False, msg=info.get('msg', ''))
|
||||||
|
|
||||||
# create a temporary file and copy content to do checksum-based replacement
|
# create a temporary file and copy content to do checksum-based replacement
|
||||||
if info['status'] != 200 and not url.startswith('file:/'):
|
if info['status'] != 200 and not url.startswith('file:/') and not (url.startswith('ftp:/') and info.get('msg', '').startswith('OK')):
|
||||||
module.fail_json(msg="Request failed", status_code=info['status'], response=info['msg'], url=url, dest=dest)
|
module.fail_json(msg="Request failed", status_code=info['status'], response=info['msg'], url=url, dest=dest)
|
||||||
|
|
||||||
if tmp_dest != '':
|
if tmp_dest != '':
|
||||||
|
|
Loading…
Reference in a new issue