python: ssl.get_server_certificate() returns unicode type in Red Hat Enterprise Linux 7.2
Issue
- python: ssl.get_server_certificate() returns 
unicodetype in Red Hat Enterprise Linux 7.2 - On RHEL7.1 
ssl.get_server_certificate()returns astringobject. - On RHEL7.2 the same function returns a 
unicodeobject. 
[user@localhost ~]$ cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.1 (Maipo)
[user@localhost ~]$ python <<< "import ssl; print type(ssl.get_server_certificate(('<REDACTED>', 443)))"
<type 'str'>
[user@localhost ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.2 (Maipo)
[user@localhost ~]$ python <<< "import ssl; print type(ssl.get_server_certificate(('<REDACTED>', 443)))"
<type 'unicode'>
  Environment
- Red Hat Enterprise Linux 7.2
 - python-2.7.5-34.el7.x86_64
 
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.