mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 14:32:28 +03:00
init: make prompt for SDK path exit cleanly on Ctrl-C
This just makes a clean exit rather than showing a python stacktrace.
This commit is contained in:
parent
6ca060e10d
commit
bc8ad37249
1 changed files with 6 additions and 1 deletions
|
@ -132,7 +132,12 @@ def main():
|
|||
# if neither --android-home nor the default sdk_path exist, prompt the user
|
||||
default_sdk_path = '/opt/android-sdk'
|
||||
while not options.no_prompt:
|
||||
s = raw_input('Enter the path to the Android SDK (' + default_sdk_path + ') here:\n> ')
|
||||
try:
|
||||
s = raw_input('Enter the path to the Android SDK ('
|
||||
+ default_sdk_path + ') here:\n> ')
|
||||
except KeyboardInterrupt:
|
||||
print('')
|
||||
sys.exit(1)
|
||||
if re.match('^\s*$', s) is not None:
|
||||
test_config['sdk_path'] = default_sdk_path
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue