1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
From: Pietro Battiston <me@pietrobattiston.it>
Date: Wed, 14 May 2014 00:33:59 +0200
Subject: Fix copying of remote files with Python 3
This closes LP #1313112
sourcecodebrowser/plugin.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sourcecodebrowser/plugin.py b/sourcecodebrowser/plugin.py
index 8ce04df..bb1f686 100644
@@ -413,7 +413,7 @@ class SourceCodeBrowserPlugin(GObject.Object, Gedit.WindowActivatable, PeasGtk.C
contents = document.get_text(document.get_start_iter(),
document.get_end_iter(),
True)
- os.write(fd, contents)
+ os.write(fd, bytes(contents, 'UTF-8'))
os.close(fd)
while Gtk.events_pending():
Gtk.main_iteration()
|