Skip to content

Commit

Permalink
Fix get_position_in_parent in fan and thermal
Browse files Browse the repository at this point in the history
  • Loading branch information
Jostar Yang committed Sep 17, 2021
1 parent df7e350 commit 36a7f0d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def get_position_in_parent(self):
integer: The 1-based relative physical position in parent device
or -1 if cannot determine the position
"""
return (self.fan_tray_index+1) \
return (self.fan_index+1) \
if not self.is_psu_fan else (self.psu_index+1)

def is_replaceable(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def get_position_in_parent(self):
Returns:
integer: The 1-based relative physical position in parent device or -1 if cannot determine the position
"""
return -1
return self.index+1

def is_replaceable(self):
"""
Expand Down

0 comments on commit 36a7f0d

Please sign in to comment.