Skip to content

Commit

Permalink
Revert NAScore score to string or None
Browse files Browse the repository at this point in the history
  • Loading branch information
rgerkin committed Nov 7, 2017
1 parent 241de5d commit 8eed3f1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sciunit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def judge(self, model, skip_incapable=False, stop_on_error=True,
try:
score = self._judge(model, skip_incapable=skip_incapable)
except CapabilityError as e:
score = NAScore(e)
score = NAScore(str(e))
score.model = model
score.test = self
except Exception as e:
Expand Down Expand Up @@ -973,10 +973,10 @@ class NoneScore(Score):
checked to see if it has the capabilities required by the test."""

def __init__(self, score, related_data=None):
if isinstance(score,(Exception,str)) or score is None:
if isinstance(score,str) or score is None:
super(NoneScore,self).__init__(score, related_data=related_data)
else:
raise InvalidScoreError("Score must be an Exception, a string, or None")
raise InvalidScoreError("Score must be a string or None")

@property
def sort_key(self):
Expand Down

0 comments on commit 8eed3f1

Please sign in to comment.