py3: use six.string_types instead of basestring
six is the canonical compatibility library for supporting Python 2 and 3 in a single codebase. The basestring was removed in Python 3 and we should use 'six.string_types' instead of 'basestring' to make code compatible with py 2 and 3 as well. Partially-implements blueprint py3-compatibility Change-Id: Idb452afdc2a828089627e14f90c53f3967ceb2ad
This commit is contained in:
@@ -736,7 +736,7 @@ class QuotaEngine(object):
|
||||
return self.__driver
|
||||
if not self._driver_cls:
|
||||
self._driver_cls = CONF.quota_driver
|
||||
if isinstance(self._driver_cls, basestring):
|
||||
if isinstance(self._driver_cls, six.string_types):
|
||||
self._driver_cls = importutils.import_object(self._driver_cls)
|
||||
self.__driver = self._driver_cls
|
||||
return self.__driver
|
||||
|
||||
Reference in New Issue
Block a user