[alacarte] MenuEditor: Don't write binary data as unicode
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [alacarte] MenuEditor: Don't write binary data as unicode
- Date: Tue, 30 Apr 2013 06:40:12 +0000 (UTC)
commit 0d7f35124a0e23a0aaf57edf0e2d84f9ba1f12d8
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Apr 30 00:08:55 2013 -0400
MenuEditor: Don't write binary data as unicode
g_keyfile_to_data returns binary data, not unicode
Alacarte/MenuEditor.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/Alacarte/MenuEditor.py b/Alacarte/MenuEditor.py
index 15523e2..4ed7172 100644
--- a/Alacarte/MenuEditor.py
+++ b/Alacarte/MenuEditor.py
@@ -263,7 +263,7 @@ class MenuEditor(object):
contents, length = keyfile.to_data()
- with codecs.open(out_path, 'w', 'utf8') as f:
+ with open(out_path, 'w') as f:
f.write(contents)
self.addItem(new_parent, file_id, dom)
@@ -404,7 +404,7 @@ class MenuEditor(object):
contents, length = keyfile.to_data()
path = os.path.join(util.getUserItemPath(), file_id)
- with codecs.open(path, 'w', 'utf8') as f:
+ with open(path, 'w') as f:
f.write(contents)
return file_id
@@ -426,7 +426,7 @@ class MenuEditor(object):
contents, length = keyfile.to_data()
path = os.path.join(util.getUserDirectoryPath(), file_id)
- with codecs.open(path, 'w', 'utf8') as f:
+ with open(path, 'w') as f:
f.write(contents)
return file_id
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]