From c4c74050bf64d931f840731efa3dca61a08daba6 Mon Sep 17 00:00:00 2001 From: pohmelie Date: Mon, 6 Apr 2015 16:41:39 +0300 Subject: [PATCH] some python 3 compatibility --- buildozer/targets/android.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/buildozer/targets/android.py b/buildozer/targets/android.py index 3b35b7d..c8f830e 100644 --- a/buildozer/targets/android.py +++ b/buildozer/targets/android.py @@ -23,6 +23,7 @@ import io from pipes import quote from sys import platform, executable from buildozer import BuildozerException +from buildozer import IS_PY3 from buildozer.target import Target from os import environ from os.path import exists, join, realpath, expanduser, basename, relpath @@ -699,7 +700,10 @@ class TargetAndroid(Target): # recreate the project.properties with io.open(project_fn, 'w', encoding='utf-8') as fd: for line in content: - fd.write(line.decode('utf-8')) + if IS_PY3: + fd.write(line) + else: + fd.write(line.decode('utf-8')) for index, ref in enumerate(references): fd.write(u'android.library.reference.{}={}\n'.format( index + 1, ref))