check if can extract std::string from dict.

This commit is contained in:
Artem Pavlenko 2006-10-09 22:07:39 +00:00
parent 459f43b39c
commit 78f2b64f5c

View File

@ -80,9 +80,13 @@ namespace
boost::python::list keys=d.keys();
for (int i=0; i<len(keys); ++i)
{
std::string key=extract<std::string>(keys[i]);
std::string value=extract<std::string>(d[key]);
params[key] = value;
std::string key = extract<std::string>(keys[i]);
object obj = d[key];
extract<std::string> ex(obj);
if (ex.check())
{
params[key] = ex();
}
}
return mapnik::datasource_cache::create(params);