Skip to content

Commit d687a63

Browse files
committed
Merge pull request #762 from inclement/context_missing_var_errors
Fixed error messages when build vars aren't set
2 parents fdd7a2f + 99b312a commit d687a63

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pythonforandroid/build.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def android_api(self, value):
121121
def ndk_ver(self):
122122
'''The version of the NDK being used for compilation.'''
123123
if self._ndk_ver is None:
124-
raise ValueError('Tried to access android_api but it has not '
124+
raise ValueError('Tried to access ndk_ver but it has not '
125125
'been set - this should not happen, something '
126126
'went wrong!')
127127
return self._ndk_ver
@@ -134,7 +134,7 @@ def ndk_ver(self, value):
134134
def sdk_dir(self):
135135
'''The path to the Android SDK.'''
136136
if self._sdk_dir is None:
137-
raise ValueError('Tried to access android_api but it has not '
137+
raise ValueError('Tried to access sdk_dir but it has not '
138138
'been set - this should not happen, something '
139139
'went wrong!')
140140
return self._sdk_dir
@@ -147,7 +147,7 @@ def sdk_dir(self, value):
147147
def ndk_dir(self):
148148
'''The path to the Android NDK.'''
149149
if self._ndk_dir is None:
150-
raise ValueError('Tried to access android_api but it has not '
150+
raise ValueError('Tried to access ndk_dir but it has not '
151151
'been set - this should not happen, something '
152152
'went wrong!')
153153
return self._ndk_dir
@@ -314,6 +314,7 @@ def prepare_build_environment(self, user_sdk_dir, user_ndk_dir,
314314
'need to manually set the NDK ver.')
315315
if ndk_ver is None:
316316
warning('Android NDK version could not be found, exiting.')
317+
exit(1)
317318
self.ndk_ver = ndk_ver
318319

319320
info('Using {} NDK {}'.format(self.ndk.capitalize(), self.ndk_ver))

0 commit comments

Comments
 (0)