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:
parent
1d7f6363d9
commit
37985fbb24
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue