提交 e25cb866 编写于 作者: C Cleber Rosa

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: NCleber Rosa <crosa@redhat.com>
上级 4cef684c
......@@ -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']
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册