removed inelegant try/except

This commit is contained in:
Martin Wagner 2021-11-07 17:27:58 +01:00
parent 74989364fe
commit c986da58f6
1 changed files with 2 additions and 6 deletions

View File

@ -3770,17 +3770,13 @@ class MainWindow(Gtk.ApplicationWindow):
def _on_show_info(self, action, param):
widget=self.get_focus()
try:
if hasattr(widget, "show_info") and callable(widget.show_info):
widget.show_info()
except AttributeError:
pass
def _on_add_to_playlist(self, action, param, mode):
widget=self.get_focus()
try:
if hasattr(widget, "add_to_playlist") and callable(widget.add_to_playlist):
widget.add_to_playlist(mode)
except AttributeError:
pass
def _on_search_button_toggled(self, button):
if button.get_active():