Fix errors reported by mypy

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2025-11-02 09:47:37 +01:00
commit 25f44f3bcf
2 changed files with 8 additions and 4 deletions

View file

@ -1,8 +1,10 @@
# -*- coding: utf-8 -*-
from os.path import *
import jwutils
from jwutils.log import *
from devtest.os import misc, test, tcf, TestCase
from devtest.os import test, tcf, TestCase
class CompareCmdOutput(TestCase): # export
@ -28,7 +30,7 @@ class CompareCmdOutput(TestCase): # export
async def _run(self, env, machine, phase):
console = test.get_console(env)
ret = await misc.cmd_exec(console, self._cmd, log_act=INFO,
ret = await jwutils.misc.cmd_exec(console, self._cmd, log_act=INFO,
act_timeout=self._act_timeout, total_timeout=self._total_timeout)
if self._cmd in ret: ret.remove(self._cmd)
ret = self._filter(ret)

View file

@ -1,8 +1,10 @@
# -*- coding: utf-8 -*-
import asyncio
import jwutils
from jwutils.log import *
from devtest.os import TestCase, misc
from devtest.os import TestCase
from devtest.os.test import *
class GrepLog(TestCase): # export
@ -18,7 +20,7 @@ class GrepLog(TestCase): # export
rx_list = self.regex if type(self.regex) == list else [ self.regex ]
for rx in rx_list:
if self.log_glob == 'journal':
ret = await misc.cmd_exec(console, 'journalctl -b | grep "{}"'.format(rx),
ret = await jwutils.misc.cmd_exec(console, 'journalctl -b | grep "{}"'.format(rx),
act_timeout=self.act_timeout, total_timeout=self.total_timeout)
else:
ret = await grep_log(console, rx, log_glob=self.log_glob,