Remove unneeded wk.ui calls
This commit is contained in:
parent
44ddb3c258
commit
13fc64e6ab
2 changed files with 6 additions and 7 deletions
|
|
@ -11,7 +11,6 @@ from wk import ansi, exe
|
||||||
from wk.cfg.hw import CPU_FAILURE_TEMP
|
from wk.cfg.hw import CPU_FAILURE_TEMP
|
||||||
from wk.os.mac import set_fans as macos_set_fans
|
from wk.os.mac import set_fans as macos_set_fans
|
||||||
from wk.std import PLATFORM
|
from wk.std import PLATFORM
|
||||||
from wk.ui import cli as ui
|
|
||||||
from wk.ui import tmux
|
from wk.ui import tmux
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -66,7 +65,7 @@ def check_mprime_results(test_obj, working_dir) -> None:
|
||||||
if re.search(r'(error|fail)', line, re.IGNORECASE):
|
if re.search(r'(error|fail)', line, re.IGNORECASE):
|
||||||
warning_lines[line] = None
|
warning_lines[line] = None
|
||||||
|
|
||||||
# print.log (check if passed)
|
# prime.log (check if passed)
|
||||||
for line in _read_file('prime.log'):
|
for line in _read_file('prime.log'):
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
match = re.search(
|
match = re.search(
|
||||||
|
|
@ -170,9 +169,9 @@ def set_apple_fan_speed(speed) -> None:
|
||||||
except (RuntimeError, ValueError, subprocess.CalledProcessError) as err:
|
except (RuntimeError, ValueError, subprocess.CalledProcessError) as err:
|
||||||
LOG.error('Failed to set fans to %s', speed)
|
LOG.error('Failed to set fans to %s', speed)
|
||||||
LOG.error('Error: %s', err)
|
LOG.error('Error: %s', err)
|
||||||
ui.print_error(f'Failed to set fans to {speed}')
|
#ui.print_error(f'Failed to set fans to {speed}')
|
||||||
for line in str(err).splitlines():
|
#for line in str(err).splitlines():
|
||||||
ui.print_warning(f' {line.strip()}')
|
# ui.print_warning(f' {line.strip()}')
|
||||||
elif PLATFORM == 'Linux':
|
elif PLATFORM == 'Linux':
|
||||||
cmd = ['apple-fans', speed]
|
cmd = ['apple-fans', speed]
|
||||||
exe.run_program(cmd, check=False)
|
exe.run_program(cmd, check=False)
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import logging
|
||||||
|
|
||||||
from wk.exe import run_program
|
from wk.exe import run_program
|
||||||
from wk.std import PLATFORM
|
from wk.std import PLATFORM
|
||||||
from wk.ui import cli as ui
|
|
||||||
|
|
||||||
|
|
||||||
# STATIC VARIABLES
|
# STATIC VARIABLES
|
||||||
|
|
@ -18,7 +17,8 @@ def keyboard_test() -> None:
|
||||||
if PLATFORM == 'Linux':
|
if PLATFORM == 'Linux':
|
||||||
run_xev()
|
run_xev()
|
||||||
else:
|
else:
|
||||||
ui.print_warning(f'Not supported under this OS: {PLATFORM}')
|
LOG.error('Not supported under this OS: %s', PLATFORM)
|
||||||
|
raise NotImplementedError(f'Not supported under this OS: {PLATFORM}')
|
||||||
|
|
||||||
|
|
||||||
def run_xev() -> None:
|
def run_xev() -> None:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue