fix: python 3.9 compat, take 2

pull/174/head
Raphaël Vinot 2020-11-24 18:49:43 +01:00
parent 46fd402d43
commit b2ed7f766b
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ def validate(values: List[str], func) -> Iterator[Tuple[str, ValueError]]:
def validate_file(p: Path) -> Iterator[InvalidListValue]:
invalid_values = []
with p.open() as f:
warninglist = json.load(f, encoding="utf-8")
warninglist = json.load(f)
if warninglist["type"] == "cidr":
invalid_values = validate(warninglist["list"], lambda value: ip_network(value, strict=True))
elif warninglist["type"] == "regexp":