You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/lib/ansible/module_utils
Damian Zaremba 1407410362 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.
(cherry picked from commit 92f777e815)
8 years ago
..
aws New Module to manage AWS direct connect link aggregation groups (#27250) 8 years ago
facts Fix fact failures cause by ordering of collectors (#30777) 8 years ago
parsing also strip strings to avoid spaces breaking match 8 years ago
powershell CamelConverter - more fixes picked up in testing (#30601) 8 years ago
six Remove automatic use of system six 9 years ago
__init__.py Fix ziploader for the cornercase of ansible invoking ansible. 10 years ago
_text.py Fix for to_text and to_bytes error handlers 9 years ago
a10.py Collated PEP8 fixes (#25293) 9 years ago
aci.py Misc typo corrections 8 years ago
aireos.py Move networking provider options to subspec (#28894) 8 years ago
ansible_tower.py Collated PEP8 fixes (#25293) 9 years ago
aos.py Remove wildcard imports and get_exception calls 8 years ago
api.py Remove comments about import order 8 years ago
aruba.py Move networking provider options to subspec (#28894) 8 years ago
asa.py Fix to not warn for context and passwords 8 years ago
avi.py Collated PEP8 fixes (#25293) 9 years ago
azure_rm_common.py azure_rm_dnsrecordset rewrite (#30449) 8 years ago
basic.py Remove wildcard imports and get_exception calls 8 years ago
bigswitch_utils.py Collated PEP8 fixes (#25293) 9 years ago
ce.py Set default value for provider transport 8 years ago
cloud.py AWSRetry: allow retrying on additional ClientError exceptions (#28483) 8 years ago
cloudstack.py cloudstack: utils: reduce cs lib dependency in modules (#26848) 9 years ago
cnos.py Resolving bug on CNOS Image download on multiple devices. 8 years ago
cnos_devicerules.py Changing new Device name from <Device Name>_cnos to <Device Name> (#27025) 9 years ago
cnos_errorcodes.py spelling fixes (non-trivial, changing messages) (#25094) 9 years ago
connection.py Remove wildcard imports and get_exception calls 8 years ago
crypto.py Add extended key usages to module_utils/crypto.py (#30128) 8 years ago
database.py Collated PEP8 fixes (#25293) 9 years ago
dellos6.py module_utils_fix_dellos6 (#28060) 8 years ago
dellos9.py Move networking provider options to subspec (#28894) 8 years ago
dellos10.py Move networking provider options to subspec (#28894) 8 years ago
digital_ocean.py Fix digital_ocean module_util api_token bug (#28924) 8 years ago
dimensiondata.py Refactor dimensiondata_network module (#21043) 9 years ago
docker_common.py docker_secret: fix broken import 8 years ago
ec2.py [cloud] Improve boto3_tag_list_to_ansible_dict backward compatibility (#30622) 8 years ago
eos.py Set default value for provider transport 8 years ago
exoscale.py exoscale: similar env vars as in cloudstack 8 years ago
f5_utils.py Remove wildcard imports 9 years ago
fortios.py Remove wildcard imports and get_exception calls 8 years ago
gcdns.py Collated PEP8 fixes (#25293) 9 years ago
gce.py Collated PEP8 fixes (#25293) 9 years ago
gcp.py Collated PEP8 fixes (#25293) 9 years ago
infinibox.py Collated PEP8 fixes (#25293) 9 years ago
ios.py Move networking provider options to subspec (#28894) 8 years ago
iosxr.py Move networking provider options to subspec (#28894) 8 years ago
ipa.py Remove wildcard imports and get_exception calls 8 years ago
ismount.py fix typo 10 years ago
json_utils.py Collated PEP8 fixes (#25293) 9 years ago
junos.py Ensure proper conversion while backing up of junos config (#28958) 8 years ago
k8s_common.py Allow for generating kubernetes YAML files from modules (#27833) 8 years ago
known_hosts.py In the git module let ssh do its own host checking 9 years ago
lxd.py Use to_text helper function to handle bytes and unicode 9 years ago
manageiq.py New model manageiq manageiq provider (#28273) 8 years ago
mysql.py Collated PEP8 fixes (#25293) 9 years ago
netapp.py Refactor E-Series VolumeCopy to use module_utils (#20902) 8 years ago
netcfg.py fix unicode errors in iosxr 9 years ago
netcli.py Consolidate boolean/mk_boolean conversion functions into a single location 9 years ago
netconf.py Fix fetch configuration in junos_command (#26392) 9 years ago
netscaler.py New module: manage Citrix Netscaler SSL certificate keys (network/netscaler/netscaler_ssl_certkey)) (#27641) 9 years ago
network.py Remove wildcard imports and get_exception calls 8 years ago
network_common.py fixes issue where filter wouldn't error on undefined var (#30921) 8 years ago
nxos.py Set default value for provider transport 8 years ago
oneview.py NetworkSetFactsModule for HPE OneView (#28730) 8 years ago
openshift_common.py k8s/openshift module_utils split (#23115) 9 years ago
openstack.py Collated PEP8 fixes (#25293) 9 years ago
ordnance.py Collated PEP8 fixes (#25293) 9 years ago
ovirt.py [oVirt] Update/Add functionalities for import storage domain (#26568) 8 years ago
postgres.py Remove wildcard imports and get_exception calls 8 years ago
pure.py Initial commit for Pure Storage Ansible module (#25386) 9 years ago
pycompat24.py Fix undefined variables, basestring usage, and some associated python3 issues 9 years ago
rax.py Consolidate boolean/mk_boolean conversion functions into a single location 9 years ago
redhat.py Use atomic_move rather than writing in place in redhat_subscription (#27132) 9 years ago
service.py Misc typo for Ansible 9 years ago
splitter.py Collated PEP8 fixes (#25293) 9 years ago
sros.py Move networking provider options to subspec (#28894) 8 years ago
univention_umc.py Collated PEP8 fixes (#25293) 9 years ago
urls.py module_utils.urls - Encode the proxy connect as binary (#30811) 8 years ago
vca.py Use response.content instead of response object (#25772) 8 years ago
vmware.py Add support for Python3 in vmware_guest_find 8 years ago
vyos.py Move networking provider options to subspec (#28894) 8 years ago