From 92a3f4b19103767b4f56c364ac947e4d4b776309 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 2 May 2024 12:19:02 +0200 Subject: [PATCH] rename local variable to stop overwriting global options This fixes a bug where if smartcardoptions is set as a str in config.yml will overwrite all command line options. a4d069862 fdroidserver!1106 --- fdroidserver/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 22af3e00..1f51fd21 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -477,8 +477,8 @@ def read_config(opts=None): # smartcardoptions must be a list since its command line args for Popen smartcardoptions = config.get('smartcardoptions') if isinstance(smartcardoptions, str): - options = re.sub(r'\s+', r' ', config['smartcardoptions']).split(' ') - config['smartcardoptions'] = [i.strip() for i in options if i] + sco_items = re.sub(r'\s+', r' ', config['smartcardoptions']).split(' ') + config['smartcardoptions'] = [i.strip() for i in sco_items if i] elif not smartcardoptions and 'keystore' in config and config['keystore'] == 'NONE': # keystore='NONE' means use smartcard, these are required defaults config['smartcardoptions'] = ['-storetype', 'PKCS11', '-providerName',