Skip to content

Commit b3a37fb

Browse files
authored
Merge pull request #794 from PraveenPenguin/fix_lscfgissue
Fix IndexError: list index out of range issue
2 parents 7818373 + 7793df7 commit b3a37fb

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

common/OpTestHMC.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,10 @@ def get_lpar_cfg(self):
299299
for values in list(splitter):
300300
data = values.split("=")
301301
key = data[0]
302-
value = data[1]
302+
try:
303+
value = data[1]
304+
except IndexError:
305+
value = 'null'
303306
cfg_dict[key] = value
304307
return cfg_dict
305308

testcases/MachineConfig.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ def __init__(self, cv_HMC=None, system_name=None,
439439
self.hmc_con = self.cv_HMC.ssh
440440
self.mmulist = self.c.run_command("tail /proc/cpuinfo | grep MMU")
441441
self.mmu = str(self.mmulist[0]).split(':')[1].strip()
442-
self.cmdline = self.c.run_command("cat /proc/cmdline | grep -o disable_radix=1")
442+
self.cmdline = self.c.run_command("cat /proc/cmdline")
443443
self.obj = OpTestInstallUtil.InstallUtil()
444444
self.os_level = self.cv_HOST.host_get_OS_Level()
445445
self.size_hgpg = hugepage

0 commit comments

Comments
 (0)