Skip to content

Commit 0342565

Browse files
authored
Update cookiejar.py
1 parent c40979b commit 0342565

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Lib/http/cookiejar.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ def __init__(self,
894894
strict_ns_set_initial_dollar=False,
895895
strict_ns_set_path=False,
896896
secure_protocols=("https", "wss"),
897-
additional_country_code_slds={},
897+
additional_country_code_slds=set(),
898898
):
899899
"""Constructor arguments should be passed as keyword arguments only."""
900900
self.netscape = netscape
@@ -910,11 +910,11 @@ def __init__(self,
910910
self.secure_protocols = secure_protocols
911911

912912
# source: https://en.wikipedia.org/wiki/Second-level_domain
913-
well_known_slds = {"co", "ac", "com", "edu", "org", "net",
913+
well_known_slds = set(["co", "ac", "com", "edu", "org", "net",
914914
"gov", "mil", "int", "aero", "biz", "cat", "coop",
915915
"info", "jobs", "mobi", "museum", "name", "pro",
916-
"travel", "eu", "tv", "or", "nom", "sch", "web"}
917-
if isinstance(additional_country_code_slds, dict):
916+
"travel", "eu", "tv", "or", "nom", "sch", "web"])
917+
if isinstance(additional_country_code_slds, set):
918918
self.slds = well_known_slds.union(additional_country_code_slds)
919919
_debug(f"The set of country code slds is {self.slds}")
920920
else:

0 commit comments

Comments
 (0)