Fix Py3 Incompatable str + bytes issue. (#456)

Fix Py3 Incompatable str + bytes issue.
This commit is contained in:
FeralBytes 2017-01-12 16:56:31 -05:00 committed by matham
parent 9848996e07
commit 8ddabd405e

View file

@ -825,10 +825,10 @@ class Buildozer(object):
if not self.file_exists(main_py):
#self.error('Unable to patch main_py to add applibs directory.')
return
header = ('import sys, os; '
'sys.path = [os.path.join(os.getcwd(),'
'"..", "_applibs")] + sys.path\n')
header = (b'import sys, os; '
b'sys.path = [os.path.join(os.getcwd(),'
b'"..", "_applibs")] + sys.path\n')
with open(main_py, 'rb') as fd:
data = fd.read()
data = header + data