changeset 109:09642528be02

keep track of parsed values as well as individual instances
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 03 May 2012 16:00:18 -0700
parents a2184db43fe2
children b9fdae6a536a
files configuration/configuration.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/configuration/configuration.py	Thu May 03 15:46:13 2012 -0700
+++ b/configuration/configuration.py	Thu May 03 16:00:18 2012 -0700
@@ -124,8 +124,8 @@
 
         # add the parsed option to the set of things parsed
         if not hasattr(parser, 'parsed'):
-            parser.parsed = set()
-        parser.parsed.add(dest)
+            parser.parsed = dict()
+        parser.parsed[dest] = value
 
 ### plugins for option types
 
@@ -268,7 +268,7 @@
                 parser_args['formatter'] = PlainDescriptionFormatter()
         parser_args.setdefault('option_class', ConfigurationOption)
         optparse.OptionParser.__init__(self, **parser_args)
-        self.parsed = set()
+        self.parsed = dict()
         self.optparse_options(self)
         # add option(s) for configuration_providers
         if load:
@@ -421,7 +421,7 @@
 
     def parse_args(self, *args, **kw):
 
-        self.parsed = set()
+        self.parsed = dict()
         options, args = optparse.OptionParser.parse_args(self, *args, **kw)
 
         # get CLI configuration options