changeset 114:d1911d9b5b19

if an option cannot be coerced to a type we should just not add a CLI handler for it
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 28 Jun 2012 14:54:29 -0700
parents f7bc409add34
children 56db0b2b90af
files configuration/configuration.py
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/configuration/configuration.py	Thu Jun 28 14:48:17 2012 -0700
+++ b/configuration/configuration.py	Thu Jun 28 14:54:29 2012 -0700
@@ -408,12 +408,10 @@
         for key, value in self.items():
             try:
                 handler = self.types[self.option_type(key)]
-            except:
-                # XXX print this for now
-                # ultimately, if an option can't be coerced to a type
+            except KeyError:
+                # if an option can't be coerced to a type
                 # we should just not add a CLI handler for it
-                print key, value
-                raise
+                continue
             args, kw = handler(key, value)
             if not args:
                 # No CLI interface