File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -162,8 +162,16 @@ def _get_composite_devices(self):
162162 logger .debug ('Composite USB service "%s" not found' % usb_service )
163163
164164 # Find all enumerated composite USB devices
165- composite_iter_vals = [self .iter_vals (k ) for k in found_composite_keys ]
166- for point , label , _ in itertools .chain .from_iterable (composite_iter_vals ):
165+ composite_iter_vals = []
166+
167+ for k in found_composite_keys :
168+ try :
169+ for v in self .iter_vals (k ):
170+ composite_iter_vals .append (v )
171+ except OSError :
172+ logger .debug ('Iterating composite USB keys ended earlier than expected' )
173+
174+ for point , label , _ in composite_iter_vals :
167175 try :
168176 # These keys in the registry enumerate all composite DosDevices
169177 # as a value with an integer. This check ensures we ignore a few
You can’t perform that action at this time.
0 commit comments