Commit 541f949c authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Fix PropertyMap.coerce_type() with python::object

parent d2990fbf
......@@ -430,6 +430,7 @@ class PropertyMap(object):
"long double", "vector<bool>", "vector<int16_t>",
"vector<int32_t>", "vector<int64_t>", "vector<double>",
"vector<long double>", "string", "vector<string>"]
p = None
for t in types:
p = self.copy(value_type=t, full=full)
......@@ -439,8 +440,10 @@ class PropertyMap(object):
if p.copy(value_type=self.value_type(), full=full) == self:
except (TypeError, ValueError, OverflowError):
except (TypeError, ValueError, OverflowError, AttributeError):
if p is None:
p = self.copy()
return p
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment