diff options
author | Matt Martz <matt@sivel.net> | 2016-05-13 09:44:00 -0500 |
---|---|---|
committer | Matt Martz <matt@sivel.net> | 2016-05-13 12:11:15 -0500 |
commit | 9121ca2f8ea56771ecfcfc2a42a0f09dd74cba1b (patch) | |
tree | ba1457ee1fcf04205f2e26080bbf7bd0e8f0842a | |
parent | cae6240e5e2d24a6e762301b7a22c60f9a6c05f8 (diff) | |
download | ansible-9121ca2f8ea56771ecfcfc2a42a0f09dd74cba1b.tar.gz |
Use .code instead of .getcode() as py24 does not have .getcode(). Fixes https://github.com/ansible/ansible-modules-core/issues/3608
-rw-r--r-- | lib/ansible/module_utils/urls.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/module_utils/urls.py b/lib/ansible/module_utils/urls.py index ec8484a52f..01da3c038b 100644 --- a/lib/ansible/module_utils/urls.py +++ b/lib/ansible/module_utils/urls.py @@ -893,7 +893,7 @@ def fetch_url(module, url, data=None, headers=None, method=None, url_password=password, http_agent=http_agent, force_basic_auth=force_basic_auth, follow_redirects=follow_redirects) info.update(r.info()) - info.update(dict(msg="OK (%s bytes)" % r.headers.get('Content-Length', 'unknown'), url=r.geturl(), status=r.getcode())) + info.update(dict(msg="OK (%s bytes)" % r.headers.get('Content-Length', 'unknown'), url=r.geturl(), status=r.code)) except NoSSLError: e = get_exception() distribution = get_distribution() |