Skip to content

Commit

Permalink
Minor fixes for networking
Browse files Browse the repository at this point in the history
  • Loading branch information
kratman committed Nov 15, 2024
1 parent f211c11 commit d894dca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,12 +336,12 @@ def no_internet_connection():
conn = socket.create_connection((host, 80), 2)
conn.close()
return False
except socket.gaierror:
except (socket.gaierror, TimeoutError):
return True


def assert_domain_equal(a, b):
"Check that two domains are equal, ignoring empty domains"
"""Check that two domains are equal, ignoring empty domains"""
a_dict = {k: v for k, v in a.items() if v != []}
b_dict = {k: v for k, v in b.items() if v != []}
assert a_dict == b_dict

0 comments on commit d894dca

Please sign in to comment.