changeset 53:18f8107aa4f9

tests fail again, what fun
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 27 Mar 2012 14:23:39 -0700
parents 47c9cdf51256
children 135322cc5bc0
files configuration/config.py
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/configuration/config.py	Tue Mar 27 14:16:42 2012 -0700
+++ b/configuration/config.py	Tue Mar 27 14:23:39 2012 -0700
@@ -356,8 +356,12 @@
                 parser.error(str(e))
         config.append(cli_config)
 
-        # generate configuration
-        self(*config)
+        missingvalues = None
+        try:
+            # generate configuration
+            self(*config)
+        except MissingValueException, e:
+            pass
 
         # dump configuration, if specified
         dump = getattr(options, 'dump')
@@ -365,6 +369,10 @@
             # TODO: have a way of specifying format other than filename
             self.serialize(dump)
 
+        if missingvalues and not dump:
+            # XXX assuming if you don't have values you were just dumping
+            parser.error(str(e))
+
         # return parsed arguments
         return options, args