From c9f6eb7b17ea52c1f7c892e9a230d50063662ce1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 5 Feb 2015 10:35:41 +0530 Subject: [PATCH] ... --- src/calibre/ebooks/docx/writer/from_html.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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):