]> git.llucax.com Git - software/blitiri.git/commitdiff
Fix command-line broken by the last commit master
authorLeandro Lucarella <llucax@gmail.com>
Sat, 27 Nov 2010 14:56:23 +0000 (11:56 -0300)
committerLeandro Lucarella <llucax@gmail.com>
Sat, 27 Nov 2010 14:56:23 +0000 (11:56 -0300)
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

index d709f305658e43d375171040fcbae698df3e4821..532bf721e3facc9256961e74497266f4e996b967 100755 (executable)
@@ -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)