diff --git a/src/dialog.py b/src/dialog.py index 8ee630d..8fab4ad 100644 --- a/src/dialog.py +++ b/src/dialog.py @@ -197,7 +197,11 @@ def accept(self) -> None: def _on_success(counts: Union[Exception, tuple[int, int, int, int, int]]): if isinstance(counts, Exception): - self._show_exception(counts) + x = counts + if (isinstance(x, OSError)): + show_critical(_('There was an error importing a file: {error}'.format(error=x))) + else: + self._show_exception(counts) return if sum(counts) == 0: @@ -240,6 +244,7 @@ def _do_import(_) -> Union[Exception, tuple[int, int, int, int, int]]: return importer.run() except Exception as e: # pylint: disable=broad-except + print('caught exception ...') return e if not self.file_list.count():