|
|
5b2f0d |
commit 0d7f35124a0e23a0aaf57edf0e2d84f9ba1f12d8
|
|
|
5b2f0d |
Author: Jasper St. Pierre <jstpierre@mecheye.net>
|
|
|
5b2f0d |
Date: Tue Apr 30 00:08:55 2013 -0400
|
|
|
5b2f0d |
|
|
|
5b2f0d |
MenuEditor: Don't write binary data as unicode
|
|
|
5b2f0d |
|
|
|
5b2f0d |
g_keyfile_to_data returns binary data, not unicode
|
|
|
5b2f0d |
|
|
|
5b2f0d |
diff --git a/Alacarte/MenuEditor.py b/Alacarte/MenuEditor.py
|
|
|
5b2f0d |
index 15523e2..4ed7172 100644
|
|
|
5b2f0d |
--- a/Alacarte/MenuEditor.py
|
|
|
5b2f0d |
+++ b/Alacarte/MenuEditor.py
|
|
|
5b2f0d |
@@ -263,7 +263,7 @@ class MenuEditor(object):
|
|
|
5b2f0d |
|
|
|
5b2f0d |
contents, length = keyfile.to_data()
|
|
|
5b2f0d |
|
|
|
5b2f0d |
- with codecs.open(out_path, 'w', 'utf8') as f:
|
|
|
5b2f0d |
+ with open(out_path, 'w') as f:
|
|
|
5b2f0d |
f.write(contents)
|
|
|
5b2f0d |
|
|
|
5b2f0d |
self.addItem(new_parent, file_id, dom)
|
|
|
5b2f0d |
@@ -404,7 +404,7 @@ class MenuEditor(object):
|
|
|
5b2f0d |
contents, length = keyfile.to_data()
|
|
|
5b2f0d |
|
|
|
5b2f0d |
path = os.path.join(util.getUserItemPath(), file_id)
|
|
|
5b2f0d |
- with codecs.open(path, 'w', 'utf8') as f:
|
|
|
5b2f0d |
+ with open(path, 'w') as f:
|
|
|
5b2f0d |
f.write(contents)
|
|
|
5b2f0d |
|
|
|
5b2f0d |
return file_id
|
|
|
5b2f0d |
@@ -426,7 +426,7 @@ class MenuEditor(object):
|
|
|
5b2f0d |
contents, length = keyfile.to_data()
|
|
|
5b2f0d |
|
|
|
5b2f0d |
path = os.path.join(util.getUserDirectoryPath(), file_id)
|
|
|
5b2f0d |
- with codecs.open(path, 'w', 'utf8') as f:
|
|
|
5b2f0d |
+ with open(path, 'w') as f:
|
|
|
5b2f0d |
f.write(contents)
|
|
|
5b2f0d |
return file_id
|
|
|
5b2f0d |
|