From d3f4d72b5997d679bb18ac1dbb34c44f2981d7bf Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Sat, 27 Nov 2010 11:56:23 -0300 Subject: [PATCH 1/1] Fix command-line broken by the last commit When adding custom sorting support, Article.__cmp__() was removed but Article are still compared for equality by the command-line interface. This commit adds Article.__eq__() to fix that. --- blitiri.cgi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/blitiri.cgi b/blitiri.cgi index d709f30..532bf72 100755 --- a/blitiri.cgi +++ b/blitiri.cgi @@ -870,6 +870,12 @@ class Article (object): return self._comments + def __eq__(self, other): + if self.path == other.path: + return True + return False + + def add_comment(self, author, raw_content, link = ''): c = Comment(self, len(self.comments)) c.set(author, raw_content, link) -- 2.43.0