[cig-commits] r15562 - cs/pythia/trunk/pyre/inventory
leif at geodynamics.org
leif at geodynamics.org
Wed Aug 19 17:31:24 PDT 2009
Author: leif
Date: 2009-08-19 17:31:24 -0700 (Wed, 19 Aug 2009)
New Revision: 15562
Modified:
cs/pythia/trunk/pyre/inventory/ConfigContext.py
Log:
Allow ConfigContext to be pickled. This is necessary for
"journal.device = remote" to work.
Modified: cs/pythia/trunk/pyre/inventory/ConfigContext.py
===================================================================
--- cs/pythia/trunk/pyre/inventory/ConfigContext.py 2009-08-19 21:49:55 UTC (rev 15561)
+++ cs/pythia/trunk/pyre/inventory/ConfigContext.py 2009-08-20 00:31:24 UTC (rev 15562)
@@ -104,11 +104,11 @@
node = self.unrecognizedProperties.getNode(component.name)
for path, value, locator in node.allProperties():
- self.error(ConfigContext.UnrecognizedPropertyError(path, value, locator))
+ self.error(UnrecognizedPropertyError(path, value, locator))
node = self.unknownComponents
for path, value, locator in node.allProperties():
- self.error(ConfigContext.UnknownComponentError(path, value, locator))
+ self.error(UnknownComponentError(path, value, locator))
# Log all configuration errors and warnings. Determine the
# severity of property/component typos as a function of the
@@ -183,31 +183,31 @@
return
- class ConfigurationError(Exception):
+class ConfigurationError(Exception):
- def __init__(self, path, value, locator):
- Exception.__init__(self)
- self.path = path
- self.value = value
- self.locator = locator
+ def __init__(self, path, value, locator):
+ Exception.__init__(self)
+ self.path = path
+ self.value = value
+ self.locator = locator
- class UnrecognizedPropertyError(ConfigurationError):
+class UnrecognizedPropertyError(ConfigurationError):
- channel = 'up'
+ channel = 'up'
- def __str__(self):
- prop = '.'.join(self.path[1:])
- return "unrecognized property '%s'" % prop
+ def __str__(self):
+ prop = '.'.join(self.path[1:])
+ return "unrecognized property '%s'" % prop
- class UnknownComponentError(ConfigurationError):
+class UnknownComponentError(ConfigurationError):
- channel = 'uc'
+ channel = 'uc'
- def __str__(self):
- component = '.'.join(self.path[1:-1])
- return "unknown component '%s'" % component
+ def __str__(self):
+ component = '.'.join(self.path[1:-1])
+ return "unknown component '%s'" % component
# end of file
More information about the CIG-COMMITS
mailing list