compare instance to basestring instead of (str, unicode)
This commit is contained in:
parent
3ced2bee38
commit
8afff42465
9 changed files with 13 additions and 13 deletions
|
|
@ -188,7 +188,7 @@ class BaseBackend(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 \
|
||||
isinstance(self, c):
|
||||
return True
|
||||
return False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue