mirror of
https://github.com/netinvent/npbackup.git
synced 2025-09-08 05:54:25 +08:00
CLI: Change wording for missing config file
This commit is contained in:
parent
dc407a4aff
commit
c19124cfdc
2 changed files with 2 additions and 2 deletions
|
@ -380,7 +380,7 @@ This is free software, and you are welcome to redistribute it under certain cond
|
|||
|
||||
if args.config_file:
|
||||
if not os.path.isfile(args.config_file):
|
||||
msg = f"Config file {args.config_file} cannot be read."
|
||||
msg = f"Config file {args.config_file} cannot be read or does not exist"
|
||||
json_error_logging(False, msg, "critical")
|
||||
sys.exit(70)
|
||||
config_file = Path(args.config_file).absolute()
|
||||
|
|
|
@ -113,7 +113,7 @@ def test_npbackup_cli_wrong_config_path():
|
|||
__main__.main()
|
||||
except SystemExit:
|
||||
print(str(logs))
|
||||
assert "Config file npbackup-non-existent.conf cannot be read" in str(
|
||||
assert "Config file npbackup-non-existent.conf cannot be read or does not exist" in str(
|
||||
logs
|
||||
), "There should be a critical error when config file is not given"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue