yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #04360
[Branch ~yade-dev/yade/trunk] Rev 2218: 1. Fix O.tags tag update. Thanks to Anton for spotting the problem.
------------------------------------------------------------
revno: 2218
committer: Václav Šmilauer <eudoxos@xxxxxxxx>
branch nick: trunk
timestamp: Tue 2010-05-11 22:02:55 +0200
message:
1. Fix O.tags tag update. Thanks to Anton for spotting the problem.
modified:
py/yadeWrapper/yadeWrapper.cpp
--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'py/yadeWrapper/yadeWrapper.cpp'
--- py/yadeWrapper/yadeWrapper.cpp 2010-05-10 11:06:45 +0000
+++ py/yadeWrapper/yadeWrapper.cpp 2010-05-11 20:02:55 +0000
@@ -143,7 +143,7 @@
FOREACH(string& val, mb->tags){
if(algorithm::starts_with(val,key+"=")){ string val1(val); algorithm::erase_head(val1,key.size()+1); return val1;}
}
- PyErr_SetString(PyExc_KeyError, "Invalid key.");
+ PyErr_SetString(PyExc_KeyError,("Invalid key: "+key+".").c_str());
python::throw_error_already_set(); /* make compiler happy; never reached */ return string();
}
void setItem(const string& key,const string& item){
@@ -151,7 +151,7 @@
PyErr_SetString(PyExc_KeyError, "Key must not contain the '=' character (implementation limitation; sorry).");
python::throw_error_already_set();
}
- FOREACH(string& val, mb->tags){if(algorithm::starts_with(val,key+"=")){ val=item; return; } }
+ FOREACH(string& val, mb->tags){if(algorithm::starts_with(val,key+"=")){ val=key+"="+item; return; } }
mb->tags.push_back(key+"="+item);
}
python::list keys(){