diff options
author | Cyril Roelandt <cyril.roelandt@enovance.com> | 2013-12-16 15:52:24 +0100 |
---|---|---|
committer | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-01-03 19:14:30 +0100 |
commit | f9e3b7adc980ae6722dfa59f8785ccaa4dc45c04 (patch) | |
tree | c84c13d62f8e13e7edb94bf6f12713c897fcea16 /keystoneclient/utils.py | |
parent | 3f1cd0ef3739bd08da6a5e0ff40f39822a6fb212 (diff) | |
download | python-keystoneclient-f9e3b7adc980ae6722dfa59f8785ccaa4dc45c04.tar.gz |
Do not try to call decode() on a text string
This fixes a call to 'isinstance' that only worked on Python2.
Closes-Bug: #1265879
Change-Id: I886da95f1ad2a8314de92be8aecb354ee3124e6d
Diffstat (limited to 'keystoneclient/utils.py')
-rw-r--r-- | keystoneclient/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/keystoneclient/utils.py b/keystoneclient/utils.py index a39af23..b2e371b 100644 --- a/keystoneclient/utils.py +++ b/keystoneclient/utils.py @@ -101,7 +101,7 @@ def find_resource(manager, name_or_id): # finally try to find entity by name try: - if isinstance(name_or_id, str): + if isinstance(name_or_id, six.binary_type): name_or_id = name_or_id.decode('utf-8', 'strict') return manager.find(name=name_or_id) except exceptions.NotFound: |