compare instance to basestring instead of (str, unicode)

This commit is contained in:
Christophe Benz 2010-08-17 19:33:06 +02:00
commit 8afff42465
9 changed files with 13 additions and 13 deletions

View file

@ -85,7 +85,7 @@ class Backend(object):
def has_caps(self, *caps):
for c in caps:
if (isinstance(c, (unicode,str)) and c in [cap.__name__ for cap in self.iter_caps()]) or \
if (isinstance(c, basestring) and c in [cap.__name__ for cap in self.iter_caps()]) or \
(type(c) == type and issubclass(self.klass, c)):
return True
return False