We should assert after we call the callable.

This commit is contained in:
James Vega 2005-01-06 15:55:09 +00:00
parent 6061f49a48
commit f2a34f78c8

View File

@ -108,9 +108,9 @@ def invertCapability(capability):
return makeAntiCapability(capability)
def canonicalCapability(capability):
assert isCapability(capability), 'got %s' % capability
if callable(capability):
capability = capability()
assert isCapability(capability), 'got %s' % capability
return capability.lower()
def unWildcardHostmask(hostmask):