Skip to content

Commit 8f2e54e

Browse files
author
Microchip Technology
committed
Fixes to USB resources handling and documentation
1 parent b4f10bd commit 8f2e54e

File tree

5 files changed

+20
-6
lines changed

5 files changed

+20
-6
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## [1.4.1] - July 2025
4+
5+
### Fixed
6+
- DSG-7940 fixed filtering of MCP2221A kits
7+
- DSG-7941 fixed releasing of USB devices after use
8+
- DSG-7933 improved CLI documentation
9+
310
## [1.3.0] - July 2025
411

512
### Added

pykitinfo/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@
4545

4646
# Build number part of version will be replaced by build number from Jenkins.
4747
# For local builds the build number is 0 and the 'snapshot' is added as Local Version Identifier
48-
__version__ = "1.3.0.23"
48+
__version__ = "1.4.1.26"
4949

5050
# The GIT commit ID and build date are generated by Jenkins when building the package
51-
COMMIT_ID = 'fba2ab15b19cad932719e4c9afc906ab75ad704f'
52-
BUILD_DATE = '2025-07-16 09:13:39'
51+
COMMIT_ID = 'c8a955dd7d2162a890d34ce6aca7a5eb73f1cbb2'
52+
BUILD_DATE = '2025-07-23 11:04:14'
5353

5454
logging.getLogger(__name__).addHandler(logging.NullHandler())

pykitinfo/detect_mcp2221a_tools.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ def detect_mcp2221a_kits(serial_number=None):
2323
kits = []
2424

2525
for device in devices:
26-
if serial_number and device['serial_number'] and not device['serial_number'].endswith(serial_number):
27-
continue
26+
if serial_number:
27+
if not device['serial_number'] or not device['serial_number'].endswith(serial_number):
28+
continue
2829

2930
mapped_port = list(filter(lambda dev: dev['tool'] == device, port_map))
3031

pykitinfo/detect_microchip_tools.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ def list_libusb_tools(serialnumber=None):
170170
tools.append(kit)
171171
except usb.core.USBError as exc:
172172
logger.error("Device VID=0x%04x PID=%04x %s", device.idVendor, device.idProduct, exc)
173+
usb.util.dispose_resources(device)
173174
return tools
174175

175176

pykitinfo/pykitinfo_cli.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,12 @@ def main():
103103
'''),
104104
epilog=textwrap.dedent('''\
105105
Usage examples:
106-
106+
Show basic kit information:
107+
pykitinfo
108+
Show detailed kit information:
109+
pykitinfo -l
110+
Show basic kit information for kit with serial number that ends with ABCDEFG
111+
pykitinfo -s ABCDEFG
107112
'''))
108113

109114
parser.add_argument("-l", "--long", action="store_true",

0 commit comments

Comments
 (0)