Commit 0bb25f37 authored by Dan Pascu's avatar Dan Pascu

Removed unnecessary try/except

parent b3df8245
...@@ -514,11 +514,7 @@ class SessionModel(QAbstractListModel): ...@@ -514,11 +514,7 @@ class SessionModel(QAbstractListModel):
selection_model.select(self.index(self.sessions.index(sibling)), selection_model.ClearAndSelect) selection_model.select(self.index(self.sessions.index(sibling)), selection_model.ClearAndSelect)
session_list.scrollToBottom() session_list.scrollToBottom()
else: else:
try:
selected_index = selection_model.selectedIndexes()[0] selected_index = selection_model.selectedIndexes()[0]
except IndexError:
pass
else:
if self.sessions[selected_index.row()] is source: if self.sessions[selected_index.row()] is source:
sibling = (session for session in source.conference.sessions if session is not source).next() sibling = (session for session in source.conference.sessions if session is not source).next()
selection_model.select(self.index(self.sessions.index(sibling)), selection_model.ClearAndSelect) selection_model.select(self.index(self.sessions.index(sibling)), selection_model.ClearAndSelect)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment