Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions drivers/ISCSISR.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,16 @@ def _initPaths(self):
util.SMlog("PATHDICT: key %s: %s" % (key,rec))
addrlist.append(key)

# Try to detect an active path in order of priority
for key in self.pathdict:
if self.adapter.has_key(key):
self.tgtidx = key
self.path = self.pathdict[self.tgtidx]['path']
if os.path.exists(self.path):
util.SMlog("Path found: %s" % self.path)
break
self.address = self.tgtidx
if not os.path.exists(self.path):
# Try to detect an active path in order of priority
for key in self.pathdict:
if self.adapter.has_key(key):
self.tgtidx = key
self.path = self.pathdict[self.tgtidx]['path']
if os.path.exists(self.path):
util.SMlog("Path found: %s" % self.path)
break
self.address = self.tgtidx
self._synchroniseAddrList(addrlist)

def _init_adapters(self):
Expand Down