From 357ca61da171bcefcc0f6ff981dec5f6260e936a Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Fri, 12 Dec 2025 13:32:18 +0100 Subject: Testsuite: T8087: fix pylint warning --- scripts/check-qemu-install | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'scripts') diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install index fadd0a9e..b2ebe750 100755 --- a/scripts/check-qemu-install +++ b/scripts/check-qemu-install @@ -32,7 +32,6 @@ # [--silent] only print on errors # [--debug] print all communication with the device -import pexpect import sys import os import time @@ -42,13 +41,15 @@ import random import traceback import logging import re -import tomli import shutil import json from io import BytesIO from datetime import datetime +import tomli +import pexpect + EXCEPTION = 0 now = datetime.now() tpm_folder = '/tmp/vyos_tpm_test' @@ -310,10 +311,10 @@ def start_swtpm(): os.mkdir(tpm_folder) def swtpm_thread(): - c = subprocess.check_output([ - 'swtpm', 'socket', '--tpmstate', f'dir={tpm_folder}', - '--ctrl', f'type=unixio,path={tpm_folder}/swtpm-sock', '--tpm2', '--log', 'level=1' - ]) + subprocess.check_output([ + 'swtpm', 'socket', '--tpmstate', f'dir={tpm_folder}', + '--ctrl', f'type=unixio,path={tpm_folder}/swtpm-sock', '--tpm2', '--log', 'level=1' + ]) from multiprocessing import Process tpm_process = Process(target=swtpm_thread) @@ -940,9 +941,9 @@ try: if i == 0: raise Exception('Invalid command detected') - elif i == 1: + if i == 1: raise Exception('Set syntax failed :/') - elif i == 2: + if i == 2: tmp = '(W)hy (T)he (F)ace? VyOS smoketest not found!' log.error(tmp) raise Exception(tmp) @@ -989,7 +990,7 @@ try: c.expect(op_mode_prompt) log.info('Generating PKI objects') - c.sendline(f'/usr/bin/vyos-configtest-pki') + c.sendline('/usr/bin/vyos-configtest-pki') c.expect(op_mode_prompt, timeout=900) script_file = '/config/scripts/vyos-foo-update.script' -- cgit v1.2.3