summaryrefslogtreecommitdiff
path: root/grc/base/Param.py
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2010-11-16 07:56:14 -0800
committerTom Rondeau <trondeau@vt.edu>2010-11-16 07:56:14 -0800
commit559d397de9ba937f470d27a7ad8b8d15f8f2f90f (patch)
tree221f32c0c10e55f9072fb22623e01fcd1dd63353 /grc/base/Param.py
parenta6b5781e36ff75adb1e4d39d755d4ab8f5efd9dd (diff)
parent53eee1c624794056fcba50a5eb50b864cbf159dd (diff)
Merge branch 'next' into tagging
Diffstat (limited to 'grc/base/Param.py')
-rw-r--r--grc/base/Param.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/grc/base/Param.py b/grc/base/Param.py
index e56eac36e1..5cd0f9d6d8 100644
--- a/grc/base/Param.py
+++ b/grc/base/Param.py
@@ -94,7 +94,7 @@ class Param(Element):
try: assert set(opt_keys) == set(option.get_opt_keys())
except AssertionError: raise Exception, 'Opt keys "%s" are not identical across all options.'%opt_keys
#if a value is specified, it must be in the options keys
- self._value = value or self.get_option_keys()[0]
+ self._value = value if value or value in self.get_option_keys() else self.get_option_keys()[0]
try: assert self.get_value() in self.get_option_keys()
except AssertionError: raise Exception, 'The value "%s" is not in the possible values of "%s".'%(self.get_value(), self.get_option_keys())
else: self._value = value or ''