show error dialog when config file is missing

This commit is contained in:
Andreas Zweili 2019-01-26 10:41:12 +01:00
parent 6c9e64f9dc
commit 24f4648bd9
1 changed files with 6 additions and 1 deletions

View File

@ -4,11 +4,16 @@ from PyQt5.QtWidgets import QApplication
import sys
from main_window import MainWindow
from helper import BorgException, show_error
if __name__ == "__main__":
app = QApplication(sys.argv)
window = MainWindow()
window.show()
window.config.read()
try:
window.config.read()
except BorgException as e:
show_error(e)
sys.exit(1)
sys.exit(app.exec_())