diff --git a/pacman_mirrors/httpfn.py b/pacman_mirrors/httpfn.py index 9b22b73e7c1ba743d819e55f869bee75786a6ef9..c583b1ea9e64d729c16b4b5a54bed8ab816d6d7e 100644 --- a/pacman_mirrors/httpfn.py +++ b/pacman_mirrors/httpfn.py @@ -137,11 +137,9 @@ def is_connected(remote_host, maxwait=2): # noinspection PyBroadException try: data = urlopen(remote_host, timeout=maxwait) - if data: - return True except: pass - return False + return bool(data) def ping_host(host, count=1):