python/qemu: Cleanup changes to ConsoleSocket

The changes to console_socket.py and machine.py are to
cleanup for pylint and flake8.

Signed-off-by: Robert Foley <robert.foley@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200717203041.9867-2-robert.foley@linaro.org>
Message-Id: <20200724064509.331-15-alex.bennee@linaro.org>
This commit is contained in:
Robert Foley 2020-07-24 07:45:07 +01:00 committed by Alex Bennée
parent 445883885a
commit 4b84d87449
3 changed files with 34 additions and 32 deletions

View file

@ -27,7 +27,7 @@ import socket
import tempfile
from typing import Optional, Type
from types import TracebackType
from qemu.console_socket import ConsoleSocket
from . import console_socket
from . import qmp
@ -674,8 +674,9 @@ class QEMUMachine:
"""
if self._console_socket is None:
if self._drain_console:
self._console_socket = ConsoleSocket(self._console_address,
file=self._console_log_path)
self._console_socket = console_socket.ConsoleSocket(
self._console_address,
file=self._console_log_path)
else:
self._console_socket = socket.socket(socket.AF_UNIX,
socket.SOCK_STREAM)