[cig-commits] r6614 - cs/pythia/trunk/pyre/applications
leif at geodynamics.org
leif at geodynamics.org
Thu Apr 19 17:50:43 PDT 2007
Author: leif
Date: 2007-04-19 17:50:43 -0700 (Thu, 19 Apr 2007)
New Revision: 6614
Modified:
cs/pythia/trunk/pyre/applications/Application.py
cs/pythia/trunk/pyre/applications/Shell.py
Log:
Fixed a bug introduced in r5988. I was trying to make 'journal'
options work in .cfg files named on the command line, without getting
"unknown component 'journal.xxx'" errors, or crashes because
'_priv_registry' is 'None'. But I unwittingly made it so that options
in .cfg files named on the command line *override* options on the
command line.
Modified: cs/pythia/trunk/pyre/applications/Application.py
===================================================================
--- cs/pythia/trunk/pyre/applications/Application.py 2007-04-19 22:16:15 UTC (rev 6613)
+++ cs/pythia/trunk/pyre/applications/Application.py 2007-04-20 00:50:43 UTC (rev 6614)
@@ -78,7 +78,7 @@
else:
paramRegistry = shelf['inventory'].getFacility(self.name)
if paramRegistry:
- registry.update(paramRegistry)
+ self.updateConfiguration(paramRegistry)
else:
self.argv.append(arg)
return
Modified: cs/pythia/trunk/pyre/applications/Shell.py
===================================================================
--- cs/pythia/trunk/pyre/applications/Shell.py 2007-04-19 22:16:15 UTC (rev 6613)
+++ cs/pythia/trunk/pyre/applications/Shell.py 2007-04-20 00:50:43 UTC (rev 6614)
@@ -67,7 +67,11 @@
# look for settings
self.initializeConfiguration()
- self.inventory._priv_registry, app.inventory._priv_registry = self.filterConfiguration(self.inventory._priv_registry)
+
+ # Temporarily set the app's registry to my own, so that
+ # updateConfiguration() will work in readParameterFiles() and
+ # collectUserInput().
+ app.inventory._priv_registry = self.inventory._priv_registry
# read parameter files given on the command line
app.readParameterFiles(registry, context)
@@ -76,6 +80,7 @@
app.collectUserInput(registry, context)
# split the configuration in two
+ self.inventory._priv_registry, app.inventory._priv_registry = self.filterConfiguration(self.inventory._priv_registry)
registry, app.registry = self.filterConfiguration(registry)
self.registry = registry
More information about the cig-commits
mailing list