From: Michael Tremer Date: Thu, 26 May 2022 10:10:55 +0000 (+0000) Subject: daemon: Cosmetic changes when connecting to the hub X-Git-Tag: 0.9.28~751 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1bb8cd702f9689e6dfa334ad2eca1970dbc5dd00;p=pakfire.git daemon: Cosmetic changes when connecting to the hub Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/daemon.py b/src/pakfire/daemon.py index 5e835f42e..7647b363d 100644 --- a/src/pakfire/daemon.py +++ b/src/pakfire/daemon.py @@ -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): """