Updated Caper to v0.2.6

This commit is contained in:
Dean Gardiner
2013-12-07 18:11:05 +13:00
parent a6b1cc833f
commit a23c409939
4 changed files with 64 additions and 14 deletions
+1 -4
View File
@@ -53,11 +53,8 @@ class CaptureConstraint(object):
elif hasattr(fragment, name):
match = self.capture_group.parser.matcher.value_match(getattr(fragment, name), arg, single=True)
return 1.0, match is not None
if not hasattr(fragment, name):
raise ValueError("Unable to find fragment with name '%s'" % name)
else:
raise ValueError("Unexpected argument type")
raise ValueError("Unable to find attribute with name '%s'" % name)
def execute(self, fragment):
results = []