From 1b1cf765be387ff4189eff6e4cfa89b22069319b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian-Samuel=20Geb=C3=BChr?= Date: Wed, 11 Jan 2023 19:16:59 +0100 Subject: [PATCH] Fix ex-and import --- cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli.py b/cli.py index 7c5bdf0..952e310 100644 --- a/cli.py +++ b/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}"