if dest non none

pull/83951/head
Brian Coca 2 months ago
parent 79e5f19190
commit c71d06af93

@ -653,9 +653,6 @@ def main():
ciphers = module.params['ciphers'] ciphers = module.params['ciphers']
use_netrc = module.params['use_netrc'] use_netrc = module.params['use_netrc']
if dest:
dest = os.path.abspath(dest)
if not re.match('^[A-Z]+$', method): if not re.match('^[A-Z]+$', method):
module.fail_json(msg="Parameter 'method' needs to be a single word in uppercase, like GET or POST.") module.fail_json(msg="Parameter 'method' needs to be a single word in uppercase, like GET or POST.")
@ -694,6 +691,9 @@ def main():
if not os.path.exists(removes): if not os.path.exists(removes):
module.exit_json(stdout="skipped, since '%s' does not exist" % removes, changed=False) module.exit_json(stdout="skipped, since '%s' does not exist" % removes, changed=False)
if dest is not None:
dest = os.path.abspath(dest)
# Make the request # Make the request
start = utcnow() start = utcnow()
r, info = uri(module, url, dest, body, body_format, method, r, info = uri(module, url, dest, body, body_format, method,

Loading…
Cancel
Save