# HG changeset patch # User Goffi # Date 1448453024 -3600 # Node ID a0810e0f386ee19247d7ef586ca3379b996c2b52 # Parent fd143578fe893d62fdda2e5865bd0927b6003438 primitivus: a warning is loggued when trying to remove an unknown popup, instead of an error raised diff -r fd143578fe89 -r a0810e0f386e frontends/src/primitivus/primitivus --- a/frontends/src/primitivus/primitivus Wed Nov 25 13:03:10 2015 +0100 +++ b/frontends/src/primitivus/primitivus Wed Nov 25 13:03:44 2015 +0100 @@ -502,7 +502,10 @@ if isinstance(self.loop.widget, urwid.Overlay): current_popup = self.loop.widget.top_w if not current_popup == widget: - self.notif_bar.removePopUp(widget) + try: + self.notif_bar.removePopUp(widget) + except ValueError: + log.warning(u"Trying to remove an unknown widget {}".format(widget)) return self.loop.widget = self.main_widget next_popup = self.notif_bar.getNextPopup()