Cleanup pylint error: redefined-outer-name
un-suppress the pylint error check for redefined-outer-name, and update the code to fix that error Test Plan: PASS: system host-show controller-0 PASS: system device-label-list PASS: system host-device-label-list PASS: system host-pv-add Story: 2008943 Task: 44050 Signed-off-by: Jia Hu <jia.hu@windriver.com> Change-Id: I7e367b5735e1a8b0c174d0cd416925d72c5d4244
This commit is contained in:
@@ -63,10 +63,10 @@ def get_disk_display_name(d):
|
||||
return '(' + str(d.uuid)[-8:] + ')'
|
||||
|
||||
|
||||
def _find_disk(cc, ihost, idisk):
|
||||
if utils.is_uuid_like(idisk):
|
||||
def _find_disk(cc, ihost, idisk_id):
|
||||
if utils.is_uuid_like(idisk_id):
|
||||
try:
|
||||
disk = cc.idisk.get(idisk)
|
||||
disk = cc.idisk.get(idisk_id)
|
||||
except exc.HTTPNotFound:
|
||||
return None
|
||||
else:
|
||||
@@ -74,7 +74,7 @@ def _find_disk(cc, ihost, idisk):
|
||||
else:
|
||||
disklist = cc.idisk.list(ihost.uuid)
|
||||
for disk in disklist:
|
||||
if disk.device_node == idisk or disk.device_path == idisk:
|
||||
if disk.device_node == idisk_id or disk.device_path == idisk_id:
|
||||
return disk
|
||||
else:
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user