From 83a76a75d315410feb96d5b5c3bcdc81051c60cb Mon Sep 17 00:00:00 2001 From: Gilles Boccon-Gibod Date: Wed, 8 Feb 2023 09:40:19 -0800 Subject: [PATCH 1/3] 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 From de477217539b6069619596f6e2344d692a496976 Mon Sep 17 00:00:00 2001 From: Gilles Boccon-Gibod Date: Wed, 8 Feb 2023 09:56:11 -0800 Subject: [PATCH 2/3] fix typo caused by an earlier refactor. --- bumble/keys.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bumble/keys.py b/bumble/keys.py index b4f4361..47be875 100644 --- a/bumble/keys.py +++ b/bumble/keys.py @@ -130,7 +130,7 @@ class PairingKeys: for (key_property, key_value) in value.items(): print(f'{prefix} {color(key_property, "green")}: {key_value}') else: - print(f'{prefix}{color(property, "cyan")}: {value}') + print(f'{prefix}{color(container_property, "cyan")}: {value}') # ----------------------------------------------------------------------------- From 5a1b03fd91450305b564a383bdb7034ecaf24cc8 Mon Sep 17 00:00:00 2001 From: Gilles Boccon-Gibod Date: Wed, 8 Feb 2023 10:54:27 -0800 Subject: [PATCH 3/3] format --- apps/pair.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/pair.py b/apps/pair.py index eb06761..cba88f8 100644 --- a/apps/pair.py +++ b/apps/pair.py @@ -366,7 +366,11 @@ 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', metavar='', 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)