From fcb6f136cde38dd562f89cf079abb2450b0d4622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Rozlach?= Date: Mon, 18 Feb 2019 18:40:51 +0100 Subject: [PATCH] flatpak_remote: Handle empty output in remote_exists (#52010) `flatpak remote-list -d` can return an empty output on Fedora 29 (version 1.2.0). --- lib/ansible/modules/packaging/os/flatpak_remote.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/modules/packaging/os/flatpak_remote.py b/lib/ansible/modules/packaging/os/flatpak_remote.py index e77c41eabba..db208f1bd96 100644 --- a/lib/ansible/modules/packaging/os/flatpak_remote.py +++ b/lib/ansible/modules/packaging/os/flatpak_remote.py @@ -169,6 +169,8 @@ def remote_exists(module, binary, name, method): output = _flatpak_command(module, False, command) for line in output.splitlines(): listed_remote = line.split() + if len(listed_remote) == 0: + continue if listed_remote[0] == to_native(name): return True return False