[kupfer] grouping: Make toplevel source more robust (when called uninitialized)



commit 85ef0e6a9b0aad9ced52ec6a06264e7985dd3cb6
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Sun May 9 16:25:25 2010 +0100

    grouping: Make toplevel source more robust (when called uninitialized)

 kupfer/obj/grouping.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/kupfer/obj/grouping.py b/kupfer/obj/grouping.py
index e9462dd..c25787f 100644
--- a/kupfer/obj/grouping.py
+++ b/kupfer/obj/grouping.py
@@ -157,6 +157,8 @@ class ToplevelGroupingSource (GroupingSource):
 		self.category = category
 
 	def toplevel_source(self):
+		if self.category not in self._sources:
+			return self
 		sources = self._sources[self.category].keys()
 		return GroupingSource(self.category, sources)
 



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