forked from auracaster/bumble_mirror
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5a1b03fd91 | |||
| de47721753 | |||
| 83a76a75d3 | |||
| d5b5ef8313 | |||
| 856a8d53cd | |||
| 177c273a57 |
+5
-1
@@ -366,7 +366,11 @@ 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)
|
||||||
|
|||||||
+2
-2
@@ -130,7 +130,7 @@ class PairingKeys:
|
|||||||
for (key_property, key_value) in value.items():
|
for (key_property, key_value) in value.items():
|
||||||
print(f'{prefix} {color(key_property, "green")}: {key_value}')
|
print(f'{prefix} {color(key_property, "green")}: {key_value}')
|
||||||
else:
|
else:
|
||||||
print(f'{prefix}{color(property, "cyan")}: {value}')
|
print(f'{prefix}{color(container_property, "cyan")}: {value}')
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -78,6 +78,8 @@ class AbortableEventEmitter(EventEmitter):
|
|||||||
return future
|
return future
|
||||||
|
|
||||||
def on_event(*_):
|
def on_event(*_):
|
||||||
|
if future.done():
|
||||||
|
return
|
||||||
msg = f'abort: {event} event occurred.'
|
msg = f'abort: {event} event occurred.'
|
||||||
if isinstance(future, asyncio.Task):
|
if isinstance(future, asyncio.Task):
|
||||||
# python < 3.9 does not support passing a message on `Task.cancel`
|
# python < 3.9 does not support passing a message on `Task.cancel`
|
||||||
|
|||||||
Reference in New Issue
Block a user