Fix unwanted console log messages with "list --json" and "info --json".
This commit is contained in:
parent
5273037a94
commit
952168ce25
1 changed files with 4 additions and 2 deletions
|
@ -353,7 +353,8 @@ def run_actions(
|
||||||
if arguments['list'].repository is None or validate.repositories_match(
|
if arguments['list'].repository is None or validate.repositories_match(
|
||||||
repository, arguments['list'].repository
|
repository, arguments['list'].repository
|
||||||
):
|
):
|
||||||
logger.warning('{}: Listing archives'.format(repository))
|
if not arguments['list'].json:
|
||||||
|
logger.warning('{}: Listing archives'.format(repository))
|
||||||
json_output = borg_list.list_archives(
|
json_output = borg_list.list_archives(
|
||||||
repository,
|
repository,
|
||||||
storage,
|
storage,
|
||||||
|
@ -367,7 +368,8 @@ def run_actions(
|
||||||
if arguments['info'].repository is None or validate.repositories_match(
|
if arguments['info'].repository is None or validate.repositories_match(
|
||||||
repository, arguments['info'].repository
|
repository, arguments['info'].repository
|
||||||
):
|
):
|
||||||
logger.warning('{}: Displaying summary info for archives'.format(repository))
|
if not arguments['info'].json:
|
||||||
|
logger.warning('{}: Displaying summary info for archives'.format(repository))
|
||||||
json_output = borg_info.display_archives_info(
|
json_output = borg_info.display_archives_info(
|
||||||
repository,
|
repository,
|
||||||
storage,
|
storage,
|
||||||
|
|
Loading…
Reference in a new issue