|
Boost-Commit : |
From: grafikrobot_at_[hidden]
Date: 2007-08-15 13:25:46
Author: grafik
Date: 2007-08-15 13:25:46 EDT (Wed, 15 Aug 2007)
New Revision: 38688
URL: http://svn.boost.org/trac/boost/changeset/38688
Log:
Trow ValueError exception from remove functions to match the set.remove functionality.
Text files modified:
trunk/tools/build/v2/test/BoostBuild.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
Modified: trunk/tools/build/v2/test/BoostBuild.py
==============================================================================
--- trunk/tools/build/v2/test/BoostBuild.py (original)
+++ trunk/tools/build/v2/test/BoostBuild.py 2007-08-15 13:25:46 EDT (Wed, 15 Aug 2007)
@@ -49,11 +49,15 @@
def re_remove(sequence,regex):
me = re.compile(regex)
result = filter( lambda x: me.match(x), sequence )
+ if 0 == len(result):
+ raise ValueError()
for r in result:
sequence.remove(r)
def glob_remove(sequence,pattern):
result = fnmatch.filter(sequence,pattern)
+ if 0 == len(result):
+ raise ValueError()
for r in result:
sequence.remove(r)
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