From c0c9327a7dd8431ff3de81b11dea8a9af4be0046 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 9 Jul 2021 13:08:00 -0400 Subject: [PATCH] Return an empty log if the value is None --- daemon-common/vm.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/daemon-common/vm.py b/daemon-common/vm.py index 8ff59280..45038cb3 100644 --- a/daemon-common/vm.py +++ b/daemon-common/vm.py @@ -791,6 +791,9 @@ def get_console_log(zkhandler, domain, lines=1000): # Get the data from ZK console_log = zkhandler.read(('domain.log.console', dom_uuid)) + if console_log is None: + return True, '' + # Shrink the log buffer to length lines shrunk_log = console_log.split('\n')[-lines:] loglines = '\n'.join(shrunk_log)