Fix ex-and import
This commit is contained in:
parent
76c637720e
commit
1b1cf765be
4
cli.py
4
cli.py
@ -10,7 +10,7 @@ from models import Instance
|
||||
|
||||
|
||||
def load_local_blocklist(filename: str) -> [Instance]:
|
||||
with open(filename, "rb") as f:
|
||||
with open(filename, "r") as f:
|
||||
data = toml.load(f)
|
||||
instances = []
|
||||
for instance_dict in data["instances"]:
|
||||
@ -25,7 +25,7 @@ def export_blocklist_toml(blocklist: [Instance], filname: str):
|
||||
toml_str = ""
|
||||
for instance in blocklist:
|
||||
toml_str += f'''
|
||||
[instance]
|
||||
[[instances]]
|
||||
name = "{instance.domain}"
|
||||
domain = "{instance.domain}"
|
||||
severity = "{instance.severity}"
|
||||
|
Loading…
Reference in New Issue
Block a user