Python 2 compatibility

This commit is contained in:
Dave Halter
2019-12-15 18:52:16 +01:00
parent 38eb2c9ba3
commit 0ce414eb94

View File

@@ -324,7 +324,7 @@ class DirectObjectAccess(object):
name = try_to_get_name(type(self._obj)) name = try_to_get_name(type(self._obj))
if name is None: if name is None:
return () return ()
return tuple(name.split('.')) return tuple(force_unicode(n) for n in name.split('.'))
def dir(self): def dir(self):
return list(map(force_unicode, dir(self._obj))) return list(map(force_unicode, dir(self._obj)))