mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 15:32:30 +03:00
better error message in publish when repo_key is not set
This commit is contained in:
parent
e5acdee21e
commit
788c8f97fd
4 changed files with 42 additions and 19 deletions
|
@ -302,6 +302,30 @@ def read_config(opts, config_file='config.py'):
|
|||
return config
|
||||
|
||||
|
||||
def assert_config_keystore(config):
|
||||
"""Check weather keystore is configured correctly and raise exception if not."""
|
||||
|
||||
nosigningkey = False
|
||||
if 'repo_keyalias' not in config:
|
||||
nosigningkey = True
|
||||
logging.critical(_("'repo_keyalias' not found in config.py!"))
|
||||
if 'keystore' not in config:
|
||||
nosigningkey = True
|
||||
logging.critical(_("'keystore' not found in config.py!"))
|
||||
elif not os.path.exists(config['keystore']):
|
||||
nosigningkey = True
|
||||
logging.critical("'" + config['keystore'] + "' does not exist!")
|
||||
if 'keystorepass' not in config:
|
||||
nosigningkey = True
|
||||
logging.critical(_("'keystorepass' not found in config.py!"))
|
||||
if 'keypass' not in config:
|
||||
nosigningkey = True
|
||||
logging.critical(_("'keypass' not found in config.py!"))
|
||||
if nosigningkey:
|
||||
raise FDroidException("This command requires a signing key, " +
|
||||
"you can create one using: fdroid update --create-key")
|
||||
|
||||
|
||||
def find_sdk_tools_cmd(cmd):
|
||||
'''find a working path to a tool from the Android SDK'''
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue