When we want to find the HCTL values for a device, we grep the
target_WWN in /sys/class/fc_transport/target8:*/port_name path.
If we find it then we use the HCTL values from the path like,
target8:0:1
where 8 -> host, 0 -> channel, 1 -> target and LUN number is
received from the storage array.
If we fail to find the device in fc_transport path, we search
in fc_remote_ports path which contains info about all connected
devices whether it be storage array port or switch port.
We found an issue with the exception handling when we don't find
a valid path in fc_transport location eventually raising an
exception and skipping the search in fc_remote_ports path.
This patch adds exception handling for both fc_transport and
fc_remote_ports paths so any errors in individual path doesn't
affect the other.
Closes-Bug: #2098954
Change-Id: I2843cb672de816439bb60094421960f195ab561d