[kupfer] objects: Use version number in Source repr



commit 2791e6eaee3563d2e6572930fecd50eee44bd33e
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Thu Aug 20 23:35:47 2009 +0200

    objects: Use version number in Source repr

 kupfer/objects.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/kupfer/objects.py b/kupfer/objects.py
index 41fdda5..58a47c7 100644
--- a/kupfer/objects.py
+++ b/kupfer/objects.py
@@ -778,14 +778,14 @@ class Source (KupferObject, pretty.OutputMixin):
 		return self._version
 
 	def __eq__(self, other):
-		return (type(self) == type(other) and repr(self).__eq__(repr(other)))
+		return type(self) == type(other) and repr(self) == repr(other)
 
 	def __hash__(self ):
 		return hash(repr(self))
 
 	def repr_key(self):
 		# use the source's name so that it is reloaded on locale change
-		return (self, self.version)
+		return (str(self), self.version)
 
 	def get_items(self):
 		"""



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]