def getSessionInfo(self): errors = [] for session in iscsi.iterateIscsiSessions(): try: self._match(session) except self.Mismatch as e: errors.append(e) else: return session self.log.debug("Session mismatches: %s", errors) raise OSError(errno.ENOENT, "Session not found")
def getSessionInfo(self): errors = [] for session in iscsi.iterateIscsiSessions(): try: self._match(session) except self.Mismatch as e: errors.append(e) else: return session self.log.debug("Session mismatches: %s", errors) raise OSError(errno.ENOENT, "Session not found")