Boost logo

Boost-Commit :

From: juergen.hunold_at_[hidden]
Date: 2008-08-09 15:16:01


Author: jhunold
Date: 2008-08-09 15:16:00 EDT (Sat, 09 Aug 2008)
New Revision: 48047
URL: http://svn.boost.org/trac/boost/changeset/48047

Log:
Fix set_default.
Fix feature and value evaluation.
Fix error message construction.

Text files modified:
   branches/build/python_port/python/boost/build/build/feature.py | 13 +++++++++++--
   1 files changed, 11 insertions(+), 2 deletions(-)

Modified: branches/build/python_port/python/boost/build/build/feature.py
==============================================================================
--- branches/build/python_port/python/boost/build/build/feature.py (original)
+++ branches/build/python_port/python/boost/build/build/feature.py 2008-08-09 15:16:00 EDT (Sat, 09 Aug 2008)
@@ -122,10 +122,19 @@
         feature: the name of the feature
         value: the default value to assign
     """
+
+ if isinstance(feature, list):
+ feature = feature[0]
+
     feature = add_grist (feature)
     f = __all_features [feature]
- if not value in f ['values']:
- raise BaseException ("The specified default value, '%s' is invalid.\n" + "allowed values are: %s" % (str (value), str (f ['values'])))
+
+ if isinstance(value, list):
+ value = value[0]
+
+ values = f['values']
+ if not value in values:
+ raise InvalidValue ("The specified default value, '%s' is invalid.\n" % value + "allowed values are: %s" % values)
 
     f ['default'] = value
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk