CLI: Rename binary to backend_binary var

This commit is contained in:
deajan 2024-05-03 11:49:55 +02:00
parent a1ecf3c3d7
commit b01590871d
2 changed files with 8 additions and 8 deletions

View file

@ -322,11 +322,11 @@ This is free software, and you are welcome to redistribute it under certain cond
else:
repo_config = None
binary = None
backend_binary = None
if args.external_backend_binary:
binary = args.external_backend_binary
if not os.path.isfile(binary):
msg = f"External backend binary {binary} cannot be found."
backend_binary = args.external_backend_binary
if not os.path.isfile(backend_binary):
msg = f"External backend binary {backend_binary} cannot be found."
json_error_logging(False, msg, "critical")
sys.exit(73)
@ -383,7 +383,7 @@ This is free software, and you are welcome to redistribute it under certain cond
"verbose": args.verbose,
"dry_run": args.dry_run,
"json_output": args.json,
"binary": binary,
"backend_binary": backend_binary,
"operation": None,
"op_args": {},
}

View file

@ -35,7 +35,7 @@ def serialize_datetime(obj):
def entrypoint(*args, **kwargs):
repo_config = kwargs.pop("repo_config")
json_output = kwargs.pop("json_output")
binary = kwargs.pop("binary", None)
backend_binary = kwargs.pop("backend_binary", None)
npbackup_runner = NPBackupRunner()
if repo_config:
@ -44,8 +44,8 @@ def entrypoint(*args, **kwargs):
npbackup_runner.verbose = kwargs.pop("verbose")
npbackup_runner.live_output = not json_output
npbackup_runner.json_output = json_output
if binary:
npbackup_runner.binary = binary
if backend_binary:
npbackup_runner.binary = backend_binary
result = npbackup_runner.__getattribute__(kwargs.pop("operation"))(
**kwargs.pop("op_args"), __no_threads=True
)