Skip to content

Commit c57fbd8

Browse files
committed
Fix usbip bus ID detection regex
1 parent b088349 commit c57fbd8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/usbip-authenticator.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ from typing import Optional
4949

5050

5151
def find_bus_id(output: str) -> Optional[str]:
52-
pattern = re.compile(r"^\s*-\s*([0-9]+-[0-9]+):.*Feitian", re.MULTILINE)
52+
pattern = re.compile(
53+
r"^\s*(?:-\s*busid\s+)?([0-9]+-[0-9]+)(?::|\s).*Feitian",
54+
re.MULTILINE,
55+
)
5356
match = pattern.search(output)
5457
if match:
5558
return match.group(1)

0 commit comments

Comments
 (0)