Improved error handling if p4a setup.py can't be read
This commit is contained in:
parent
5af135fca4
commit
a63979279f
1 changed files with 4 additions and 2 deletions
|
@ -523,8 +523,10 @@ class TargetAndroid(Target):
|
|||
setup = fd.read()
|
||||
deps = re.findall("install_reqs = (\[[^\]]*\])", setup, re.DOTALL | re.MULTILINE)[1]
|
||||
deps = ast.literal_eval(deps)
|
||||
except Exception:
|
||||
deps = []
|
||||
except IOError:
|
||||
self.buildozer.error('Failed to read python-for-android setup.py at {}'.format(
|
||||
join(self.pa_dir, 'setup.py')))
|
||||
exit(1)
|
||||
pip_deps = []
|
||||
for dep in deps:
|
||||
pip_deps.append('"{}"'.format(dep))
|
||||
|
|
Loading…
Add table
Reference in a new issue