From 0127670f04006997bc4d22c8015588c51bd5785e Mon Sep 17 00:00:00 2001 From: Kui Shi Date: Tue, 15 Oct 2013 16:47:58 +0800 Subject: [PATCH] Replace basestring with six.string_types six.string_types Possible types for text data. This is basestring() in Python 2 and str in Python 3. Partial implements: blueprint py33-support Change-Id: I25b463efdfe2e20af92dd805d4f44b40d4bd4b35 --- troveclient/auth.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/troveclient/auth.py b/troveclient/auth.py index db86f530..d2f69994 100644 --- a/troveclient/auth.py +++ b/troveclient/auth.py @@ -15,12 +15,14 @@ from __future__ import print_function from troveclient import exceptions +import six + def get_authenticator_cls(cls_or_name): """Factory method to retrieve Authenticator class.""" if isinstance(cls_or_name, type): return cls_or_name - elif isinstance(cls_or_name, basestring): + elif isinstance(cls_or_name, six.string_types): if cls_or_name == "keystone": return KeyStoneV2Authenticator elif cls_or_name == "rax":