aboutsummaryrefslogtreecommitdiff
path: root/mammoth/results.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-12-06 12:32:27 +0000
committerMichael Williamson <mike@zwobble.org>2015-12-06 12:32:59 +0000
commite315a8360b5a312b9b692408473d942de94557d1 (patch)
tree2e71949fb3ad7d33b5a9e1cb60655e0d47246654 /mammoth/results.py
parent323aaa3aa2bcc03c9c46b173f33b9cdfac205e74 (diff)
Ensure Result.messages is always unique
Diffstat (limited to 'mammoth/results.py')
-rw-r--r--mammoth/results.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mammoth/results.py b/mammoth/results.py
index 9112296..59c3a42 100644
--- a/mammoth/results.py
+++ b/mammoth/results.py
@@ -1,10 +1,12 @@
import collections
+from .lists import unique
+
class Result(object):
def __init__(self, value, messages):
self.value = value
- self.messages = messages
+ self.messages = unique(messages)
def map(self, func):
return Result(func(self.value), self.messages)