mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 22:40:29 +03:00
init: fix init with Debian Android SDK packages
If the auto-detected SDK path passes test_sdk_exists(), then just use it without prompting. fixes !821
This commit is contained in:
parent
85fa53008c
commit
767573f2ec
1 changed files with 16 additions and 15 deletions
|
|
@ -94,22 +94,23 @@ def main():
|
||||||
p = '/opt/android-sdk'
|
p = '/opt/android-sdk'
|
||||||
if os.path.exists(p):
|
if os.path.exists(p):
|
||||||
default_sdk_path = p
|
default_sdk_path = p
|
||||||
|
test_config['sdk_path'] = default_sdk_path
|
||||||
|
|
||||||
while not options.no_prompt:
|
if not common.test_sdk_exists(test_config):
|
||||||
try:
|
del(test_config['sdk_path'])
|
||||||
s = input(_('Enter the path to the Android SDK (%s) here:\n> ') % default_sdk_path)
|
while not options.no_prompt:
|
||||||
except KeyboardInterrupt:
|
try:
|
||||||
print('')
|
s = input(_('Enter the path to the Android SDK (%s) here:\n> ') % default_sdk_path)
|
||||||
sys.exit(1)
|
except KeyboardInterrupt:
|
||||||
if re.match(r'^\s*$', s) is not None:
|
print('')
|
||||||
test_config['sdk_path'] = default_sdk_path
|
sys.exit(1)
|
||||||
else:
|
if re.match(r'^\s*$', s) is not None:
|
||||||
test_config['sdk_path'] = s
|
test_config['sdk_path'] = default_sdk_path
|
||||||
if not default_sdk_path:
|
else:
|
||||||
del(test_config['sdk_path'])
|
test_config['sdk_path'] = s
|
||||||
break
|
if common.test_sdk_exists(test_config):
|
||||||
if common.test_sdk_exists(test_config):
|
break
|
||||||
break
|
default_sdk_path = ''
|
||||||
|
|
||||||
if test_config.get('sdk_path') and not common.test_sdk_exists(test_config):
|
if test_config.get('sdk_path') and not common.test_sdk_exists(test_config):
|
||||||
raise FDroidException(_("Android SDK not found at {path}!")
|
raise FDroidException(_("Android SDK not found at {path}!")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue