[kupfer: 41/51] grouping: Define repr_key for GroupingSource



commit 0973cd5346c18eb71c6700a7f11862255b345b51
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Sat Jan 9 23:34:59 2010 +0100

    grouping: Define repr_key for GroupingSource

 kupfer/obj/grouping.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/kupfer/obj/grouping.py b/kupfer/obj/grouping.py
index 2f13440..1a53c1c 100644
--- a/kupfer/obj/grouping.py
+++ b/kupfer/obj/grouping.py
@@ -120,6 +120,11 @@ class GroupingSource (Source):
 		if mergetime > 0.05:
 			self.output_debug("Warning(?): merged in %s seconds" % mergetime)
 
+	def repr_key(self):
+		# Distinguish when used as GroupingSource
+		if type(self) is GroupingSource:
+			return unicode(self)
+		return Source.repr_key(self)
 
 	@classmethod
 	def _make_group_leader(cls, leaves):



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