Skip to content

Commit c9fa938

Browse files
committed
Removed version check if __version__ absent
1 parent f7ce126 commit c9fa938

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pythonforandroid/toolchain.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,20 @@ def check_python_dependencies():
4545
else:
4646
if version is None:
4747
continue
48-
cur_ver = sys.modules[module].__version__
48+
try:
49+
cur_ver = sys.modules[module].__version__
50+
except AttributeError: # this is sometimes not available
51+
continue
4952
if LooseVersion(cur_ver) < LooseVersion(version):
5053
print('ERROR: {} version is {}, but python-for-android needs '
5154
'at least {}.'.format(module, cur_ver, version))
5255
ok = False
5356

54-
5557
if not ok:
5658
print('python-for-android is exiting due to the errors above.')
5759
exit(1)
5860

61+
5962
check_python_dependencies()
6063

6164

0 commit comments

Comments
 (0)