Commit e1bb82f6 by Guba Sándor

move pythoncom to initalize for virtio as well

parent c6a76f3f
...@@ -38,12 +38,12 @@ def get_serial(): ...@@ -38,12 +38,12 @@ def get_serial():
port = None port = None
if system == 'Windows': if system == 'Windows':
port = _get_virtio_device() port = _get_virtio_device()
import pythoncom
pythoncom.CoInitialize()
if port: if port:
from windows.win32virtio import SerialPort from windows.win32virtio import SerialPort
else: else:
from twisted.internet.serialport import SerialPort from twisted.internet.serialport import SerialPort
import pythoncom
pythoncom.CoInitialize()
port = r'\\.\COM1' port = r'\\.\COM1'
elif system == "Linux": elif system == "Linux":
port = "/dev/virtio-ports/agent" port = "/dev/virtio-ports/agent"
......
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