fix the displaying of the error dialogs

Exceptions which get raised in threads don't bubble up into the main code on
their own. So we either communicate them to the main loop or we handle them
directly in the thread. I'm going for the later for the moment because the
other way seems to be quite complex.
This commit is contained in:
Andreas Zweili 2019-02-16 10:17:13 +01:00
parent 1d7f6363d9
commit 37985fbb24
1 changed files with 3 additions and 2 deletions

View File

@ -5,7 +5,7 @@ import json
from PyQt5.QtCore import QThread
from helper import BorgException
from helper import BorgException, show_error
class BorgQtThread(QThread):
@ -46,7 +46,8 @@ class BorgQtThread(QThread):
return
else:
err = json.loads(error)
raise BorgException(err['message'])
show_error(BorgException(err['message']))
self.stop()
class ListThread(BorgQtThread):