Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Commit

Permalink
Fix checks for pci slot number to use lower case compares. (#2051)
Browse files Browse the repository at this point in the history
* Fix checks for pci slot number to use lower case compares.

* Merged with current changes
  • Loading branch information
govint authored and shuklanirdesh82 committed Jan 9, 2018
1 parent b4f0a43 commit 3d77774
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions esx_service/vmdk_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -1264,11 +1264,11 @@ def get_controller_pci_slot(vm, pvscsi, key_offset):
if pvscsi.slotInfo:
slot_num = pvscsi.slotInfo.pciSlotNumber
else:
# Slot number is got from from the VM config
# Slot number is got from from the VM config.
key = 'scsi{0}.pciSlotNumber'.format(pvscsi.key -
key_offset)
slot = [cfg for cfg in vm.config.extraConfig \
if cfg.key == key]
if cfg.key.lower() == key.lower()]
# If the given controller exists
if slot:
slot_num = slot[0].value
Expand All @@ -1285,7 +1285,7 @@ def get_controller_pci_slot(vm, pvscsi, key_offset):
# Get PCI bridge slot number
key = 'pciBridge{0}.pciSlotNumber'.format(bus)
bridge_slot = [cfg for cfg in vm.config.extraConfig \
if cfg.key == key]
if cfg.key.lower() == key.lower()]
if bridge_slot:
slot_num = bridge_slot[0].value
else:
Expand Down

0 comments on commit 3d77774

Please sign in to comment.