fix getting the filename from the keystore option.

This commit is contained in:
Gilles Boccon-Gibod
2023-02-08 09:40:19 -08:00
parent d5b5ef8313
commit 83a76a75d3
2 changed files with 2 additions and 2 deletions

View File

@@ -366,7 +366,7 @@ async def pair(
'--request', is_flag=True, help='Request that the connecting peer initiate pairing' '--request', is_flag=True, help='Request that the connecting peer initiate pairing'
) )
@click.option('--print-keys', is_flag=True, help='Print the bond keys before pairing') @click.option('--print-keys', is_flag=True, help='Print the bond keys before pairing')
@click.option('--keystore-file', help='File in which to store the pairing keys') @click.option('--keystore-file', metavar='<filename>', help='File in which to store the pairing keys')
@click.argument('device-config') @click.argument('device-config')
@click.argument('hci_transport') @click.argument('hci_transport')
@click.argument('address-or-name', required=False) @click.argument('address-or-name', required=False)

View File

@@ -217,7 +217,7 @@ class JsonKeyStore(KeyStore):
params = device_config.keystore.split(':', 1)[1:] params = device_config.keystore.split(':', 1)[1:]
namespace = str(device_config.address) namespace = str(device_config.address)
if params: if params:
filename = params[1] filename = params[0]
else: else:
filename = None filename = None