Skip to content

Commit

Permalink
errorreporting: Fix an KeyError for a missing 'Widget Module' entry
Browse files Browse the repository at this point in the history
  • Loading branch information
ales-erjavec committed Oct 3, 2016
1 parent cc4d147 commit 18dc15b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Orange/canvas/application/errorreporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,13 @@ def __init__(self, data):
icon = QApplication.style().standardIcon(QStyle.SP_MessageBoxWarning)
F = self.DataField

def _finished(*, key=(data[F.MODULE], data[F.WIDGET_MODULE]),
filename=data[F.WIDGET_SCHEME]):
def _finished(*, key=(data.get(F.MODULE, ""),
data.get(F.WIDGET_MODULE, "")),
filename=data.get(F.WIDGET_SCHEME, None)):
self._cache.add(key)
try: os.remove(filename)
except Exception: pass
if filename is not None:
try: os.remove(filename)
except Exception: pass

super().__init__(None, Qt.Window, modal=True,
sizeGripEnabled=True, windowIcon=icon,
Expand Down

0 comments on commit 18dc15b

Please sign in to comment.