diff --git a/borg_qt/borg_interface.py b/borg_qt/borg_interface.py index 34ccf9f..530944e 100644 --- a/borg_qt/borg_interface.py +++ b/borg_qt/borg_interface.py @@ -5,7 +5,7 @@ import json from PyQt5.QtCore import QThread -from helper import BorgException +from helper import BorgException, show_error class BorgQtThread(QThread): @@ -106,6 +106,15 @@ class BackupThread(BorgQtThread): if self.excludes: self.command.extend(self.excludes) + def run(self): + self.json_output, self.json_err = self.p.communicate() + self.p.wait() + try: + self.process_json_error(self.json_err) + except BorgException as e: + show_error(e) + self.stop() + def _process_prefix(self, prefix): """Prepares the prefix for the final command.""" if prefix: