From 83a76a75d315410feb96d5b5c3bcdc81051c60cb Mon Sep 17 00:00:00 2001 From: Gilles Boccon-Gibod Date: Wed, 8 Feb 2023 09:40:19 -0800 Subject: [PATCH] fix getting the filename from the keystore option. --- apps/pair.py | 2 +- bumble/keys.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/pair.py b/apps/pair.py index 8b8142c..eb06761 100644 --- a/apps/pair.py +++ b/apps/pair.py @@ -366,7 +366,7 @@ async def pair( '--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('--keystore-file', help='File in which to store the pairing keys') +@click.option('--keystore-file', metavar='', help='File in which to store the pairing keys') @click.argument('device-config') @click.argument('hci_transport') @click.argument('address-or-name', required=False) diff --git a/bumble/keys.py b/bumble/keys.py index d62011a..b4f4361 100644 --- a/bumble/keys.py +++ b/bumble/keys.py @@ -217,7 +217,7 @@ class JsonKeyStore(KeyStore): params = device_config.keystore.split(':', 1)[1:] namespace = str(device_config.address) if params: - filename = params[1] + filename = params[0] else: filename = None