From: Leandro Lucarella Date: Sat, 27 Nov 2010 14:56:23 +0000 (-0300) Subject: Fix command-line broken by the last commit X-Git-Url: https://git.llucax.com/software/blitiri.git/commitdiff_plain/d3f4d72b5997d679bb18ac1dbb34c44f2981d7bf?ds=sidebyside 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. --- 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)