From 78e3fd01ff5810549fa01c6ff580a466e5a93c87 Mon Sep 17 00:00:00 2001 From: Zhijian Li Date: Fri, 7 Jun 2024 06:40:26 +0000 Subject: [PATCH] fix flake8 error --- consutil/lib.py | 2 +- tests/console_test.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/consutil/lib.py b/consutil/lib.py index c88791036af..e597e3b6437 100644 --- a/consutil/lib.py +++ b/consutil/lib.py @@ -277,7 +277,7 @@ def init_device_prefix(): @staticmethod def list_console_ttys(): """Lists all console tty devices""" - cmd = ["bash", "-c" , "ls " + SysInfoProvider.DEVICE_PREFIX + "*"] + cmd = ["bash", "-c", "ls " + SysInfoProvider.DEVICE_PREFIX + "*"] output, _ = SysInfoProvider.run_command(cmd, abort=False) ttys = output.split('\n') ttys = list([dev for dev in ttys if re.match(SysInfoProvider.DEVICE_PREFIX + r"\d+", dev) != None]) diff --git a/tests/console_test.py b/tests/console_test.py index cfc9cc44932..a45aff64625 100644 --- a/tests/console_test.py +++ b/tests/console_test.py @@ -14,7 +14,8 @@ from click.testing import CliRunner from utilities_common.db import Db -from consutil.lib import * +from consutil.lib import ConsolePortProvider, ConsolePortInfo, ConsoleSession, SysInfoProvider, DbUtils, \ + InvalidConfigurationError, LineBusyError, LineNotFoundError, ConnectionFailedError from sonic_py_common import device_info from jsonpatch import JsonPatchConflict