Commit ffab8a80 by Szeberényi Imre

Windows 11

parent bace35cc
......@@ -112,7 +112,7 @@ class SerialLineReceiver(SerialLineReceiverBase):
self.transport.dataBuffer = b""
self.transport._tempDataBuffer = [] # will be added to dataBuffer in doWrite
self.transport._tempDataLen = 0
self.transport.write('\r\n')
self.transport.write(b'\r\n')
if self.running:
self.send_command(
command='agent_started',
......
......@@ -3,6 +3,7 @@
"""
import logging
import platform
import re
logger = logging.getLogger()
......@@ -12,10 +13,10 @@ def _get_virtio_device():
from infi.devicemanager import DeviceManager
dm = DeviceManager()
dm.root.rescan()
# Search Virtio-Serial by name TODO: search by class_guid
# Search Virtio-Serial by service
for i in dm.all_devices:
if i.has_property("description"):
if "virtio-serial".upper() in i.description.upper():
if re.search("virtio.*serial", i.description, re.IGNORECASE):
path = ("\\\\?\\" +
i.children[0].instance_id.lower().replace('\\', '#') +
"#" + GUID.lower()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment