[kupfer] core: Modify rescanner catalog only on initialize=True



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

    core: Modify rescanner catalog only on initialize=True

 kupfer/core/sources.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/kupfer/core/sources.py b/kupfer/core/sources.py
index 9957c7e..6f5ffff 100644
--- a/kupfer/core/sources.py
+++ b/kupfer/core/sources.py
@@ -270,9 +270,9 @@ class SourceController (pretty.OutputMixin):
 		if initialize:
 			self._initialize_sources(sources)
 			self._cache_sources(sources)
+			self.rescanner.set_catalog(self.sources)
 		if plugin_id:
 			self._register_plugin_objects(plugin_id, *sources)
-		self.rescanner.set_catalog(self.sources)
 
 	def _register_plugin_objects(self, plugin_id, *objects):
 		"Register a plugin id mapping for @objects"
@@ -548,6 +548,7 @@ class SourceController (pretty.OutputMixin):
 	def initialize(self):
 		"Initialize all sources and cache toplevel sources"
 		self._initialize_sources(self.sources)
+		self.rescanner.set_catalog(self.sources)
 		self._cache_sources(self.toplevel_sources)
 		self.loaded_successfully = True
 



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