Fix return value in case of a glib exception

This commit is contained in:
Patrick Ulbrich
2021-04-11 18:23:35 +02:00
parent 3ad0edb80c
commit 7ef91050cf

View File

@@ -47,7 +47,7 @@ class ConnectivityTest:
try:
return (not self._monitor.can_reach(Gio.NetworkAddress.new(TEST_HOST, 8080)))
except:
return False
return True
else:
return (os.system('ping -c1 -W2 %s > /dev/null 2>&1' % TEST_HOST) != 0)