kelproject / pykube

Python client library for Kubernetes
Apache License 2.0
349 stars 183 forks source link

Test if selector is instance of str in backwards compatible way #129

Closed adambom closed 7 years ago

adambom commented 7 years ago

In python2 it's possible to pass a unicode string as a selector, which doesn't trigger this condition, causing an error. By using six.string_types instead of str we make sure to test for both kinds of strings.