diff options
author | Jauhien Piatlicki (jauhien) <piatlicki@gmail.com> | 2013-09-05 23:30:31 +0200 |
---|---|---|
committer | Jauhien Piatlicki (jauhien) <piatlicki@gmail.com> | 2013-09-05 23:30:31 +0200 |
commit | a53fabbfe293bbbc2380a7bcd3331fee1fde918e (patch) | |
tree | 5d43bde445eba3759d1605f4e7b7a36d8e200104 | |
parent | gs-pypi: fix errors (diff) | |
download | g-sorcery-a53fabbfe293bbbc2380a7bcd3331fee1fde918e.tar.gz g-sorcery-a53fabbfe293bbbc2380a7bcd3331fee1fde918e.tar.bz2 g-sorcery-a53fabbfe293bbbc2380a7bcd3331fee1fde918e.zip |
g_sorcery/backend: fix problems with unicode for python-2
-rw-r--r-- | g_sorcery/backend.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/g_sorcery/backend.py b/g_sorcery/backend.py index 963eb06..686cda0 100644 --- a/g_sorcery/backend.py +++ b/g_sorcery/backend.py @@ -478,12 +478,12 @@ class Backend(object): source = ebuild_g.generate(package, ebuild_data) with open(os.path.join(path, name + '-' + version + '.ebuild'), - 'w') as f: - f.write('\n'.join(source)) + 'wb') as f: + f.write('\n'.join(source).encode('utf-8')) source = metadata_g.generate(package) - with open(os.path.join(path, 'metadata.xml'), 'w') as f: - f.write('\n'.join(source)) + with open(os.path.join(path, 'metadata.xml'), 'wb') as f: + f.write('\n'.join(source).encode('utf-8')) eclass_g = self.eclass_g_class() path = os.path.join(overlay, 'eclass') |