From 0a32bbe5effb3e298925dc28e30148f1b34810ee Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Wed, 8 Feb 2023 14:13:30 +0100 Subject: host-control: Improve config error reporting Signed-off-by: Paul Kocialkowski --- host-control | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/host-control b/host-control index efeea96..47f8716 100755 --- a/host-control +++ b/host-control @@ -93,7 +93,7 @@ class host_control(): def config_lookup(self, host, name): if not "config" in host: self.print_message("No config in host: " + self.host) - return 1 + return None for c in host["config"]: if not "name" in c: @@ -104,6 +104,7 @@ class host_control(): if c["name"] == name: return c + self.print_message("No config for " + name + " in host: " + self.host) return None def config_copy_command(self, host, source, sink): @@ -150,7 +151,6 @@ class host_control(): def config_update(self, host, name): config = self.config_lookup(host, name) if config is None: - self.print_message("No config for " + name + " in host: " + self.host) return 1 if not self.shell: -- cgit v1.2.3