[repository sources] copy source configuration: source's __init__ modify it while config.sources() return a cached dictionary which shouldn't be modified
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 10 Jan 2013 22:51:10 +0100
changeset 8672 e8afecc3b576
parent 8671 150bbb066167
child 8673 8ea63a2cc2cc
[repository sources] copy source configuration: source's __init__ modify it while config.sources() return a cached dictionary which shouldn't be modified This causes pb since f8aa87a773b2 (though it's unclear why it hasn't been a problem before). Closes #2521848
server/repository.py
--- a/server/repository.py	Thu Jan 10 22:50:34 2013 +0100
+++ b/server/repository.py	Thu Jan 10 22:51:10 2013 +0100
@@ -186,7 +186,7 @@
         self.shutting_down = False
         # sources (additional sources info in the system database)
         self.system_source = self.get_source('native', 'system',
-                                             config.sources()['system'])
+                                             config.sources()['system'].copy())
         self.sources = [self.system_source]
         self.sources_by_uri = {'system': self.system_source}
         # querier helper, need to be created after sources initialization