[ 
https://issues.apache.org/jira/browse/LIBCLOUD-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16604587#comment-16604587
 ] 

Quentin Pradet commented on LIBCLOUD-1011:
------------------------------------------

Thanks for the report!

Feel free to open a pull request on Github.

> A unicode string is not an instance of basestring on Python 2.7.5
> -----------------------------------------------------------------
>
>                 Key: LIBCLOUD-1011
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-1011
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Core
>         Environment: Python 2.7.5 on Centos 7.
>            Reporter: Nigel B
>            Priority: Major
>
> I've run into a problem with basestring defined in libcloud.utils.py3 for 
> python. It does not recognize unicode as an instance of basestring. That 
> doesn't sound right.
>  
> Here's terminal output from a machine where I can consistently reproduce this 
> issue.
>  
> {{$ python}}
> {{Python 2.7.5 (default, Aug  4 2017, 00:39:18)}}
> {{[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2}}
> {{Type "help", "copyright", "credits" or "license" for more information.}}
> {{>>> foo = u'my-unicode-string'}}
> {{>>> isinstance(foo, basestring)}}
> {{True}}
> {{>>> from libcloud.utils.py3 import basestring}}
> {{/srv/softserve/env/lib/python2.7/site-packages/libcloud/utils/py3.py:60: 
> UserWarning: Missing backports.ssl_match_hostname package}}
> {{  warnings.warn("Missing backports.ssl_match_hostname package")}}
> {{>>> isinstance(foo, basestring)}}
> {{False}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to