Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix flake8 error
Browse files Browse the repository at this point in the history
lizhijianrd committed Jun 7, 2024

Verified

This commit was signed with the committer’s verified signature.
MylesBorins Myles Borins
1 parent 69d465b commit 78e3fd0
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion consutil/lib.py
Original file line number Diff line number Diff line change
@@ -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])
3 changes: 2 additions & 1 deletion tests/console_test.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 78e3fd0

Please sign in to comment.