Tuesday 15 March 2011

Remote Files

Traceback (most recent call last):
File "/home/rltoscano/.gnome2/gedit/plugins/giterdone/filebrowsercontroller.py", line 169, in _on_fb_selection_changed
paths = self._get_selected_paths(selection)
File "/home/rltoscano/.gnome2/gedit/plugins/giterdone/filebrowsercontroller.py", line 245, in _get_selected_paths
return [model[row][2][len('file://'):] for row in rows]
TypeError: '__main__.GDaemonFile' object is unsubscriptable

Happens when I have a remote filesystem in the file browser. Maybe model[row] returns something else than I expect or maybe its model[row][2] that returns a non-string. Solution would be to ignore the _on_fb_selection_changed event if root is not local, or make a runtime type check on the objects in model.

No comments:

Post a Comment