From 5bac7c059635ead41a0a0ad356f0d76a40f2e75b Mon Sep 17 00:00:00 2001
From: Nicolas KAROLAK <nicolas@karolak.fr>
Date: Tue, 15 Oct 2019 17:18:42 +0000
Subject: [PATCH] fix nmcli output split

---
 tests/test_dns_records.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/test_dns_records.py b/tests/test_dns_records.py
index 484bad64..e3ff9a7d 100755
--- a/tests/test_dns_records.py
+++ b/tests/test_dns_records.py
@@ -24,7 +24,7 @@ def get_dns_servers() -> set:
         _, output = subprocess.getstatusoutput(
             "nmcli -f all device show | grep IP4.DNS | awk '{ print $2 }'"
         )
-        servers = output.split("\n")
+        servers = [l for l in output.split("\n") if l]
 
     if not len(servers):
         # resolvconf
-- 
GitLab