summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Cammarata <jimi@sngx.net>2013-09-05 22:03:42 -0700
committerJames Cammarata <jimi@sngx.net>2013-09-05 22:03:42 -0700
commitaa0a31c0fc454594c53f820944a24a22e3fdcdfe (patch)
tree7ac341144b6a51325d861259d0eed1f699916c36
parent82e1722fff846e32c785507ecbef592f59aee94b (diff)
parenta311ee35b37520cc879eb6f50046861f3f162328 (diff)
downloadansible-aa0a31c0fc454594c53f820944a24a22e3fdcdfe.tar.gz
Merge pull request #3966 from sergevanginderachter/uribug
Fix bug in uri where redirect check fails.
-rw-r--r--library/network/uri2
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))