Thanks for the quick fix on issue #63, it is working as expected. I noticed however another minor issue with _safe_string().
If i'm correct it expects uft8-encoded strings, coercing them to unicode. Passing in unicode strings (i.e. unicode strings for node property values), results in an encoding error. Is it possible to do small check first, and let unicode pass? E.g.:
def _safe_string(self, s):
if isinstance(s, unicode):
if isinstance(s, basestring):
# We avoid convert non-string values
Are you sure about this? Please, could you send a small test for this. What I understand is the lib doesn't allow to do do things like:
node = gdb.nodes.create()
node[u"property"] = u"value"
I think that is covered with tests, but maybe I'm not understanding you properly.
Fixes #64, added a small unicode check