2011-08-30 20:32:33 +00:00
|
|
|
diff --git a/sepolgen/src/sepolgen/matching.py b/sepolgen/src/sepolgen/matching.py
|
|
|
|
index 1a9a3e5..d56dd92 100644
|
|
|
|
--- a/sepolgen/src/sepolgen/matching.py
|
|
|
|
+++ b/sepolgen/src/sepolgen/matching.py
|
2011-05-25 20:20:29 +00:00
|
|
|
@@ -50,7 +50,7 @@ class Match:
|
2010-05-27 21:23:08 +00:00
|
|
|
return 1
|
|
|
|
|
|
|
|
class MatchList:
|
|
|
|
- DEFAULT_THRESHOLD = 120
|
|
|
|
+ DEFAULT_THRESHOLD = 150
|
|
|
|
def __init__(self):
|
|
|
|
# Match objects that pass the threshold
|
|
|
|
self.children = []
|
2011-05-25 20:20:29 +00:00
|
|
|
@@ -63,14 +63,15 @@ class MatchList:
|
2010-05-27 21:23:08 +00:00
|
|
|
def best(self):
|
|
|
|
if len(self.children):
|
|
|
|
return self.children[0]
|
|
|
|
- else:
|
|
|
|
- return None
|
|
|
|
+ if len(self.bastards):
|
|
|
|
+ return self.bastards[0]
|
|
|
|
+ return None
|
|
|
|
|
|
|
|
def __len__(self):
|
|
|
|
# Only return the length of the matches so
|
|
|
|
# that this can be used to test if there is
|
|
|
|
# a match.
|
|
|
|
- return len(self.children)
|
|
|
|
+ return len(self.children) + len(self.bastards)
|
|
|
|
|
|
|
|
def __iter__(self):
|
|
|
|
return iter(self.children)
|