diff options
author | Paul Kocialkowski | 2023-02-08 14:13:30 +0100 |
---|---|---|
committer | Paul Kocialkowski | 2023-02-08 14:14:32 +0100 |
commit | 0a32bbe5effb3e298925dc28e30148f1b34810ee (patch) | |
tree | e8d643e15ae6834561b63897a12008677ada2b56 | |
parent | 177663688be751d691b116e291663df2a3e0e9ef (diff) |
host-control: Improve config error reporting
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
-rwxr-xr-x | host-control | 4 |
1 files 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: |