From 729c92ed41f829ac4c0b67d9f0b0e95a6714a527 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sun, 27 Jan 2019 21:42:48 +0100 Subject: [PATCH] fix a key lookup in the Config class --- borg_qt/config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/borg_qt/config.py b/borg_qt/config.py index 788cd12..1209a2f 100644 --- a/borg_qt/config.py +++ b/borg_qt/config.py @@ -33,7 +33,7 @@ class Config(QDialog): """returns the repository path or the repository server path if a server was provided in the configuration.""" if 'repository_path' in self.config['borgqt']: - if self.config['borgqt']['server']: + if 'server' in self.config['borgqt']: return self._create_server_path() else: return self.config['borgqt']['repository_path'] @@ -106,9 +106,9 @@ class Config(QDialog): def _create_server_path(self): """creates the full server path from the server, user and port options.""" - if not self.config['borgqt']['user']: + if 'user' not in self.config['borgqt']: raise BorgException("User is missing in config.") - if not self.config['borgqt']['port']: + if 'port' not in self.config['borgqt']: raise BorgException("Port is missing in config.") server_path = (self.config['borgqt']['user'] + "@"