Use .code instead of .getcode() as py24 does not have .getcode(). Fixes https://github.com/ansible/ansible-modules-core/issues/3608
This commit is contained in:
parent
cae6240e5e
commit
9121ca2f8e
1 changed files with 1 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue