improve caps
This commit is contained in:
parent
0afb45d777
commit
f65ca1c8b6
3 changed files with 4 additions and 10 deletions
|
|
@ -39,10 +39,7 @@ class Module:
|
|||
if not self.klass:
|
||||
raise ImportError("This is not a backend module (no Backend class found)")
|
||||
|
||||
def has_caps(self, caps):
|
||||
if not isinstance(caps, (list,tuple)):
|
||||
caps = (caps,)
|
||||
|
||||
def has_caps(self, *caps):
|
||||
for c in caps:
|
||||
if issubclass(self.klass, c):
|
||||
return True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue