refactor: Rename load_remote_blocklist->load_blocklist_from_instance

pull/2/head
Julian-Samuel Gebühr 2023-01-12 16:06:01 +01:00 committed by Georg Krause
parent 6a2a13bd74
commit 181ac45bbf
Signed by: gcrkrause
GPG Key ID: 2970D504B2183D22
1 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ def blocklist_json_to_instances(blocklist_json: str) -> [Instance]:
return instances
def load_remote_blocklist(server: str, token: str) -> [Instance]:
def load_blocklist_from_instance(server: str, token: str) -> [Instance]:
headers = {
f'Authorization': f'Bearer {token}',
}
@ -81,7 +81,7 @@ def cli():
with open(args.remote_blocklist) as f:
remote_blocklist = blocklist_json_to_instances(json.load(f))
else:
remote_blocklist = load_remote_blocklist(server=args.server, token=args.token)
remote_blocklist = load_blocklist_from_instance(server=args.server, token=args.token)
"""Load local blocklist only when needed"""
if args.action in ["diff", "deploy"]: