Merge pull request #791 from kivy/JonasT-patch-1

Fix python 2 crash when reading config file
This commit is contained in:
Mathieu Virbel 2019-01-21 18:53:18 +01:00 committed by GitHub
commit d354782dc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -119,7 +119,10 @@ class Buildozer(object):
self.config.getrawdefault = self._get_config_raw_default
if exists(filename):
self.config.read(filename, "utf-8")
try:
self.config.read(filename, "utf-8")
except TypeError: # python 2 has no second arg here
self.config.read(filename)
self.check_configuration_tokens()
# Check all section/tokens for env vars, and replace the