mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-09 00:40:11 +01:00
improved error messages related to missing/non-functional SDK paths
This commit is contained in:
parent
56b7326b9a
commit
40fdc2a943
@ -66,8 +66,7 @@ def read_config(opts, config_file='config.py'):
|
|||||||
'stats_to_carbon': False,
|
'stats_to_carbon': False,
|
||||||
'repo_maxage': 0,
|
'repo_maxage': 0,
|
||||||
'build_server_always': False,
|
'build_server_always': False,
|
||||||
'keystore': os.path.join(os.getenv('HOME'),
|
'keystore': '$HOME/.local/share/fdroidserver/keystore.jks',
|
||||||
'.local', 'share', 'fdroidserver', 'keystore.jks'),
|
|
||||||
'char_limits': {
|
'char_limits': {
|
||||||
'Summary' : 50,
|
'Summary' : 50,
|
||||||
'Description' : 1500
|
'Description' : 1500
|
||||||
@ -86,10 +85,13 @@ def read_config(opts, config_file='config.py'):
|
|||||||
config[k] = os.path.expandvars(v)
|
config[k] = os.path.expandvars(v)
|
||||||
|
|
||||||
if not config['sdk_path']:
|
if not config['sdk_path']:
|
||||||
logging.critical("$ANDROID_HOME is not set!")
|
logging.critical("Neither $ANDROID_HOME nor sdk_path is set, no Android SDK found!")
|
||||||
|
sys.exit(3)
|
||||||
|
if not os.path.exists(config['sdk_path']):
|
||||||
|
logging.critical('Android SDK path "' + config['sdk_path'] + '" does not exist!')
|
||||||
sys.exit(3)
|
sys.exit(3)
|
||||||
if not os.path.isdir(config['sdk_path']):
|
if not os.path.isdir(config['sdk_path']):
|
||||||
logging.critical("$ANDROID_HOME points to a non-existing directory!")
|
logging.critical('Android SDK path "' + config['sdk_path'] + '" is not a directory!')
|
||||||
sys.exit(3)
|
sys.exit(3)
|
||||||
|
|
||||||
if any(k in config for k in ["keystore", "keystorepass", "keypass"]):
|
if any(k in config for k in ["keystore", "keystorepass", "keypass"]):
|
||||||
|
Loading…
Reference in New Issue
Block a user