mirror of
https://github.com/mapnik/mapnik.git
synced 2025-12-08 20:13:09 +00:00
check if can extract std::string from dict.
This commit is contained in:
parent
459f43b39c
commit
78f2b64f5c
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user