refactor: Rename load_remote_blocklist->load_blocklist_from_instance
This commit is contained in:
parent
eaccce8c6e
commit
ce5c1ae39d
@ -43,7 +43,7 @@ def blocklist_json_to_instances(blocklist_json: str) -> [Instance]:
|
|||||||
return instances
|
return instances
|
||||||
|
|
||||||
|
|
||||||
def load_remote_blocklist(server: str, token: str) -> [Instance]:
|
def load_blocklist_from_instance(server: str, token: str) -> [Instance]:
|
||||||
headers = {
|
headers = {
|
||||||
f'Authorization': f'Bearer {token}',
|
f'Authorization': f'Bearer {token}',
|
||||||
}
|
}
|
||||||
@ -81,7 +81,7 @@ def cli():
|
|||||||
with open(args.remote_blocklist) as f:
|
with open(args.remote_blocklist) as f:
|
||||||
remote_blocklist = blocklist_json_to_instances(json.load(f))
|
remote_blocklist = blocklist_json_to_instances(json.load(f))
|
||||||
else:
|
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"""
|
"""Load local blocklist only when needed"""
|
||||||
if args.action in ["diff", "deploy"]:
|
if args.action in ["diff", "deploy"]:
|
||||||
|
Loading…
Reference in New Issue
Block a user