Merge pull request #721 from inclement/fix_file_read
Improved error handling if p4a setup.py can't be read
This commit is contained in:
commit
0abbee5661
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)[0]
|
||||
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