From e25cb866947ca44a9b1c426e70a4aad6d7dc566b Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Sun, 9 Oct 2016 10:06:12 -0300 Subject: [PATCH] Sysinfo: make journalctl quiet on cursor acquisition On environments where there are no journals available, journalctl may output error messages such as "No journal files were found", unless `--quiet` is given as an option. The other call to journalctl already does that, but we missed in the first call (that does the cursor acquisition). Signed-off-by: Cleber Rosa --- avocado/core/sysinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avocado/core/sysinfo.py b/avocado/core/sysinfo.py index f08a6e02..33c1f665 100644 --- a/avocado/core/sysinfo.py +++ b/avocado/core/sysinfo.py @@ -231,7 +231,7 @@ class JournalctlWatcher(Collectible): def _get_cursor(self): try: - cmd = 'journalctl --lines 1 --output json' + cmd = 'journalctl --quiet --lines 1 --output json' result = subprocess.check_output(cmd.split()) last_record = json.loads(result) return last_record['__CURSOR'] -- GitLab