Skip to content

Commit

Permalink
detect: Don't fail while detecting megacli enclosure
Browse files Browse the repository at this point in the history
The current code was failing as the device enclose doesn't have any
PdType like in :

{'ExitCode': '0x00', 'Adapter0': 'Device at Enclosure - 32, Slot - 14 is
not found'}
  • Loading branch information
Erwan Velu committed Oct 1, 2014
1 parent 4ba7d8d commit 4084501
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ def detect_megacli(hw_lst):
info = megacli.pdinfo(ctrl,
enc['DeviceId'],
disk_num)

# If no PdType, it means that's not a disk
if 'PdType' not in info.keys():
continue

hw_lst.append(('pdisk',
disk,
'ctrl',
Expand Down

0 comments on commit 4084501

Please sign in to comment.