ansible/lib/ansible
Damian Zaremba 92f777e815 module_utils.urls - Encode the proxy connect as binary (#30811)
* module_utils.urls - Encode the proxy connect as binary

Under Python3 the sendall method expects binary not a string.

Prior to this change the below exception was being thrown;
Traceback (most recent call last):
  File "/tmp/ansible_umxox7_x/ansible_modlib.zip/ansible/module_utils/urls.py", line 1044, in fetch_url
    client_key=client_key, cookies=cookies)
  File "/tmp/ansible_umxox7_x/ansible_modlib.zip/ansible/module_utils/urls.py", line 951, in open_url
    r = urllib_request.urlopen(*urlopen_args)
  File "/opt/blue-python/3.6/lib/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/opt/blue-python/3.6/lib/python3.6/urllib/request.py", line 524, in open
    req = meth(req)
  File "/tmp/ansible_umxox7_x/ansible_modlib.zip/ansible/module_utils/urls.py", line 729, in http_request
    s.sendall((self.CONNECT_COMMAND % (self.hostname, self.port)).decode())
AttributeError: 'str' object has no attribute 'decode'

Encoding the value is inline with the lines below (Proxy-Authorization etc) which are being sent as binary.
2017-09-29 14:32:29 -07:00
..
cli fixed pull's ansible/git invocation options (#30938) 2017-09-27 19:50:36 -04:00
compat Remove wildcard imports 2017-07-28 22:10:17 -07:00
config add ability to set default tags in config 2017-09-22 19:21:13 -04:00
errors Ansible Config part2 (#27448) 2017-08-15 16:38:59 -04:00
executor fixed winrm to use proper task vars (#31072) 2017-09-29 11:12:56 +10:00
galaxy Removes container-enabled warning (#27578) 2017-08-01 12:51:03 -04:00
inventory use set to quicken group host membership 2017-09-22 19:07:37 -04:00
module_utils module_utils.urls - Encode the proxy connect as binary (#30811) 2017-09-29 14:32:29 -07:00
modules - Fix to return error message back to the module. (#31035) 2017-09-29 17:06:30 +05:30
parsing Use vault_id when encrypted via vault-edit (#30772) 2017-09-26 12:28:31 -04:00
playbook avoid include_Xs conflating vars with options (#30954) 2017-09-27 19:53:10 -04:00
plugins removed typo from dig docs 2017-09-29 11:23:58 -04:00
template Fix dangerous default args. (#29839) 2017-09-12 00:11:13 -07:00
utils Fix encoding error with path to ssh 2017-09-22 15:31:21 -07:00
vars remove fact namespacing 2017-09-10 17:37:52 -04:00
__init__.py
constants.py moved from eval to templating + literal_eval 2017-09-20 21:35:02 -04:00
release.py Bump the versions now that devel is 2.5 2017-09-06 13:13:57 -07:00