Skip to content

Commit

Permalink
Merge pull request avocado-framework-tests#1507 from Naresh-ibm/dlpar…
Browse files Browse the repository at this point in the history
…_py3

Fixing python3 issue in dlpar.py
  • Loading branch information
narasimhan-v authored Jan 3, 2020
2 parents f3ab5cf + ffa2fff commit a0be5ea
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions io/pci/dlpar.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ def get_mcp_component(component):
'''
for line in process.system_output('lsrsrc IBM.MCP %s' % component,
ignore_status=True, shell=True,
sudo=True).decode("utf-8").splitlines():
sudo=True).decode("utf-8") \
.splitlines():
if component in line:
return line.split()[-1].strip('{}\"')
return ''
Expand All @@ -126,8 +127,10 @@ def get_partition_name(component):
get partition name from lparstat -i
'''

for line in process.system_output('lparstat -i', ignore_status=True,
shell=True, sudo=True).splitlines():
for line in process.system_output('lparstat -i',
ignore_status=True, shell=True,
sudo=True).decode("utf-8") \
.splitlines():
if component in line:
return line.split(':')[-1].strip()
return ''
Expand Down

0 comments on commit a0be5ea

Please sign in to comment.