fix home button issue in python3

svn: r21066
This commit is contained in:
Benny Malengier 2013-01-11 15:18:11 +00:00
parent ce7192c034
commit 0ffe2869d6
2 changed files with 4 additions and 0 deletions

View File

@ -252,6 +252,8 @@ class FlatNodeMap(object):
:param type: an object handle :param type: an object handle
:Returns: the path, or None if handle does not link to a path :Returns: the path, or None if handle does not link to a path
""" """
if isinstance(handle, UNITYPE):
handle = handle.encode('utf-8')
index = self._hndl2index.get(handle) index = self._hndl2index.get(handle)
if index is None: if index is None:
return None return None

View File

@ -848,6 +848,8 @@ class TreeBaseModel(GObject.Object, Gtk.TreeModel):
""" """
Get the node for a handle. Get the node for a handle.
""" """
if isinstance(handle, UNITYPE):
handle = handle.encode('utf-8')
return self.handle2node.get(handle) return self.handle2node.get(handle)
def handle2path(self, handle): def handle2path(self, handle):