Don't fetch remote blocklist when merging files
This commit is contained in:
parent
3d0854ac4c
commit
626516e98c
@ -120,12 +120,14 @@ def cli():
|
|||||||
else:
|
else:
|
||||||
token = os.getenv('MBD_TOKEN')
|
token = os.getenv('MBD_TOKEN')
|
||||||
|
|
||||||
"""if there is a remote blocklist provided load this instead of fetching it from a server (for debugging reasons)"""
|
"""Get a remote blocklist only when necessary"""
|
||||||
if args.remote_blocklist:
|
if args.action in ["diff", "deploy"]:
|
||||||
with open(args.remote_blocklist) as f:
|
"""if there is a remote blocklist provided load this instead of fetching it from a server (for debugging reasons)"""
|
||||||
remote_blocklist = blocklist_json_to_instances(json.load(f))
|
if args.remote_blocklist:
|
||||||
else:
|
with open(args.remote_blocklist) as f:
|
||||||
remote_blocklist = load_blocklist_from_instance(server=args.server, token=token)
|
remote_blocklist = blocklist_json_to_instances(json.load(f))
|
||||||
|
else:
|
||||||
|
remote_blocklist = load_blocklist_from_instance(server=args.server, token=token)
|
||||||
|
|
||||||
"""Load local blocklist only when needed"""
|
"""Load local blocklist only when needed"""
|
||||||
if args.action in ["diff", "deploy", "merge"]:
|
if args.action in ["diff", "deploy", "merge"]:
|
||||||
|
Loading…
Reference in New Issue
Block a user