Skip to content

Commit 9fdfe59

Browse files
authored
Merge pull request kivy#1512 from jtoledo1974/master
No need to decode into unicode when running in python 3
2 parents 7f8242f + 5a28743 commit 9fdfe59

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pythonforandroid/recipes/android/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from pythonforandroid import logger
55

66
from os.path import join
7+
from sys import version_info
78

89

910
class AndroidRecipe(IncludedFilesBehaviour, CythonRecipe):
@@ -30,7 +31,8 @@ def prebuild_arch(self, arch):
3031
th = '#define {} {}\n'
3132
tpy = '{} = {}\n'
3233

33-
bootstrap = bootstrap_name = self.ctx.bootstrap.name.decode('utf-8')
34+
bootstrap = self.ctx.bootstrap.name
35+
bootstrap = bootstrap_name = bootstrap if version_info >= (3, ) else bootstrap.decode('utf-8')
3436
is_sdl2 = bootstrap_name in ('sdl2', 'sdl2python3', 'sdl2_gradle')
3537
is_pygame = bootstrap_name in ('pygame',)
3638
is_webview = bootstrap_name in ('webview',)

0 commit comments

Comments
 (0)