]> git.ipfire.org Git - pakfire.git/commitdiff
daemon: Cosmetic changes when connecting to the hub
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 26 May 2022 10:10:55 +0000 (10:10 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 26 May 2022 10:10:55 +0000 (10:10 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/daemon.py

index 5e835f42eba8284fd7692d320102a29a0ddb2775..7647b363d6f9e75038ec703f3421e277ecb8c01c 100644 (file)
@@ -60,17 +60,17 @@ class Daemon(object):
                self.max_running = system.cpu_count * 2
 
        def connect_to_hub(self):
-               huburl = self.config.get("daemon", "server", PAKFIRE_HUB)
+               url = self.config.get("daemon", "server", PAKFIRE_HUB)
 
                # Host Credentials
                hostname = self.config.get("daemon", "hostname", system.hostname)
                password = self.config.get("daemon", "secret")
 
-               if not (hostname and password):
+               if not hostname or not password:
                        raise RuntimeError("Host credentials are not set")
 
                # Create connection to the hub
-               return hub.Hub(huburl, hostname, password)
+               return hub.Hub(url, hostname, password)
 
        def run(self, heartbeat=30):
                """