Skip to content

Commit

Permalink
Uniform yield
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonarddeR committed Dec 20, 2024
1 parent b726cf6 commit 98d01bc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/bdDetect.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def getDriversForConnectedUsbDevices(
if typeDef.useAsFallback:
fallbackDriversAndMatches.append({driver, match})
else:
yield (driver, match)
yield (zdriver, match)

hidName = _getStandardHidDriverName()
if limitToDevices and hidName not in limitToDevices:
Expand All @@ -211,10 +211,10 @@ def getDriversForConnectedUsbDevices(
# This ensures that a vendor specific driver is preferred over the braille HID protocol.
# This preference may change in the future.
if _isHIDBrailleMatch(match):
yield hidName, match
yield (hidName, match)

for driver, match in fallbackDriversAndMatches:
yield driver, match
yield (driver, match)


def _getStandardHidDriverName() -> str:
Expand Down Expand Up @@ -271,7 +271,7 @@ def getDriversForPossibleBluetoothDevices(
if not callable(matchFunc):
continue
if matchFunc(match):
yield driver, match
yield (driver, match)

hidName = _getStandardHidDriverName()
if limitToDevices and hidName not in limitToDevices:
Expand Down

0 comments on commit 98d01bc

Please sign in to comment.