mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
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
This commit is contained in:
parent
1eaba25021
commit
92a3f4b191
1 changed files with 2 additions and 2 deletions
|
|
@ -477,8 +477,8 @@ def read_config(opts=None):
|
||||||
# smartcardoptions must be a list since its command line args for Popen
|
# smartcardoptions must be a list since its command line args for Popen
|
||||||
smartcardoptions = config.get('smartcardoptions')
|
smartcardoptions = config.get('smartcardoptions')
|
||||||
if isinstance(smartcardoptions, str):
|
if isinstance(smartcardoptions, str):
|
||||||
options = re.sub(r'\s+', r' ', config['smartcardoptions']).split(' ')
|
sco_items = re.sub(r'\s+', r' ', config['smartcardoptions']).split(' ')
|
||||||
config['smartcardoptions'] = [i.strip() for i in options if i]
|
config['smartcardoptions'] = [i.strip() for i in sco_items if i]
|
||||||
elif not smartcardoptions and 'keystore' in config and config['keystore'] == 'NONE':
|
elif not smartcardoptions and 'keystore' in config and config['keystore'] == 'NONE':
|
||||||
# keystore='NONE' means use smartcard, these are required defaults
|
# keystore='NONE' means use smartcard, these are required defaults
|
||||||
config['smartcardoptions'] = ['-storetype', 'PKCS11', '-providerName',
|
config['smartcardoptions'] = ['-storetype', 'PKCS11', '-providerName',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue