diff options
author | James Cammarata <jimi@sngx.net> | 2013-09-05 22:03:42 -0700 |
---|---|---|
committer | James Cammarata <jimi@sngx.net> | 2013-09-05 22:03:42 -0700 |
commit | aa0a31c0fc454594c53f820944a24a22e3fdcdfe (patch) | |
tree | 7ac341144b6a51325d861259d0eed1f699916c36 | |
parent | 82e1722fff846e32c785507ecbef592f59aee94b (diff) | |
parent | a311ee35b37520cc879eb6f50046861f3f162328 (diff) | |
download | ansible-aa0a31c0fc454594c53f820944a24a22e3fdcdfe.tar.gz |
Merge pull request #3966 from sergevanginderachter/uribug
Fix bug in uri where redirect check fails.
-rw-r--r-- | library/network/uri | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/network/uri b/library/network/uri index a58c49d0e6..3d05db2281 100644 --- a/library/network/uri +++ b/library/network/uri @@ -261,7 +261,7 @@ def uri(module, url, dest, user, password, body, method, headers, redirects, soc # and update dest with the new url filename except: pass - if resp_redir['status'] in ["301", "302", "303", "307"]: + if 'status' in resp_redir and resp_redir['status'] in ["301", "302", "303", "307"]: url = resp_redir['location'] redirected = True dest = os.path.join(dest, url_filename(url)) |