Skip to content

Commit

Permalink
Merge pull request #27 from tecknicaltom/noncrashes
Browse files Browse the repository at this point in the history
fix exception in json if test cases don't crash
  • Loading branch information
jfoote committed May 14, 2015
2 parents 0444f07 + bc2f732 commit a5ec635
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions exploitable/lib/classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ def __add__(self, tag):

# for python3
def __lt__(self, other):
if other is None:
return False

if not issubclass(type(other), type(self)):
raise TypeError("cannot compare type {} to type {}".format(type(other), type(self)))

Expand All @@ -116,6 +119,9 @@ def __lt__(self, other):
return False

def __cmp__(self, other):
if other is None:
return 1

if not issubclass(type(other), type(self)):
raise TypeError("cannot compare type {} to type {}".format(type(other), type(self)))

Expand Down

0 comments on commit a5ec635

Please sign in to comment.