From b59e32042e8565ade80e1bf56cfb2189897b144c Mon Sep 17 00:00:00 2001 From: Neil Schemenauer Date: Tue, 4 Oct 2016 13:11:02 -0700 Subject: [PATCH] Avoid mixed-type comparision in _py_htmltext. --- quixote/html/_py_htmltext.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quixote/html/_py_htmltext.py b/quixote/html/_py_htmltext.py index e42a77c..fd645ac 100644 --- a/quixote/html/_py_htmltext.py +++ b/quixote/html/_py_htmltext.py @@ -44,9 +44,13 @@ class htmltext(object): return len(self.s) def __eq__(self, other): + if isinstance(other, htmltext): + return (self.s == other.s) return (self.s == other) def __lt__(self, other): + if isinstance(other, htmltext): + return (self.s < other.s) return (self.s < other) def __hash__(self):