From 197ca7e36ffe8fa9b06f42c289c698077a1e2797 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 20 Aug 2020 14:56:49 +0200 Subject: [PATCH] update: warn with --nosign if keystore/repo_pubkey are not present This should also make it easier to use index.make() as an API function since this changes whether the instance var exists before checking the value. --- fdroidserver/index.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdroidserver/index.py b/fdroidserver/index.py index d6d396a5..a21bb91b 100644 --- a/fdroidserver/index.py +++ b/fdroidserver/index.py @@ -57,7 +57,10 @@ def make(apps, apks, repodir, archive): """ from fdroidserver.update import METADATA_VERSION - if not common.options.nosign: + if hasattr(common.options, 'nosign') and common.options.nosign: + if 'keystore' not in common.config and 'repo_pubkey' not in common.config: + raise FDroidException(_('"repo_pubkey" must be present in config.py when using --nosign!')) + else: common.assert_config_keystore(common.config) # Historically the index has been sorted by App Name, so we enforce this ordering here