Skip to content

Commit 019194a

Browse files
debmcsammj
authored andcommitted
OpTestSystem: Simplify kernel grep
Simplify the kernel grep. Signed-off-by: Deb McLemore <[email protected]>
1 parent b03c5d8 commit 019194a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/OpTestSystem.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ def check_kernel(self):
465465
rc = sys_pty.expect(["x=exit", "Petitboot", ".*#", ".*\$", "login:", pexpect.TIMEOUT, pexpect.EOF], timeout=5)
466466
if rc in [0,1,5,6]:
467467
return OpSystemState.UNKNOWN # we really should not have arrived in here and not much we can do
468-
sys_pty.sendline("cat /proc/version | cut -d ' ' -f 3 | grep %s; echo $?" % (self.openpower))
468+
sys_pty.sendline("cat /proc/version | grep {}; echo $?".format(self.openpower))
469469
time.sleep(0.2)
470470
rc = sys_pty.expect([self.expect_prompt, pexpect.TIMEOUT, pexpect.EOF], timeout=1)
471471
if rc == 0:

0 commit comments

Comments
 (0)