diff --git a/src/calibre/ebooks/docx/writer/from_html.py b/src/calibre/ebooks/docx/writer/from_html.py index e588c4fa33..876ced57ad 100644 --- a/src/calibre/ebooks/docx/writer/from_html.py +++ b/src/calibre/ebooks/docx/writer/from_html.py @@ -76,7 +76,13 @@ class TextStyle(object): getattr(self, x) for x in self.ALL_PROPS)) def __eq__(self, other): - return hash(self) == hash(other) + for x in self.ALL_PROPS: + if getattr(self, x) != getattr(other, x, None): + return False + return True + + def __ne__(self, other): + return not self == other class LineBreak(object):