From f6855ef1afdbe572a1acd81c9d624d74d2ccb280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Sun, 16 May 2021 17:59:43 +0100 Subject: Use the new usbmon-tools 3 DeviceAddress command line flags. --- freestyle_hid/tools/extract_chatter.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'freestyle_hid/tools/extract_chatter.py') diff --git a/freestyle_hid/tools/extract_chatter.py b/freestyle_hid/tools/extract_chatter.py index 80e9629..5b9818d 100755 --- a/freestyle_hid/tools/extract_chatter.py +++ b/freestyle_hid/tools/extract_chatter.py @@ -8,7 +8,7 @@ import logging import sys import textwrap -from typing import BinaryIO +from typing import BinaryIO, Optional import click import click_log @@ -17,6 +17,7 @@ import usbmon import usbmon.chatter import usbmon.pcapng import usbmon.support.hid +from usbmon.tools import _utils logger = logging.getLogger() click_log.basic_config(logger) @@ -64,6 +65,7 @@ _ENCRYPTED_MESSAGE = construct.Struct( "Device address (busnum.devnum) of the device to extract capture" " of. If none provided, device descriptors will be relied on." ), + type=_utils.DeviceAddressType(), ) @click.option( "--encrypted-protocol / --no-encrypted-protocol", @@ -95,7 +97,7 @@ _ENCRYPTED_MESSAGE = construct.Struct( ) def main( *, - device_address: str, + device_address: Optional[usbmon.addresses.DeviceAddress], encrypted_protocol: bool, verbose_encryption_setup: bool, print_keepalive: bool, -- cgit v1.2.3