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,6 +353,7 @@ 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
|
||||||
):
|
):
|
||||||
|
if not arguments['list'].json:
|
||||||
logger.warning('{}: Listing archives'.format(repository))
|
logger.warning('{}: Listing archives'.format(repository))
|
||||||
json_output = borg_list.list_archives(
|
json_output = borg_list.list_archives(
|
||||||
repository,
|
repository,
|
||||||
|
@ -367,6 +368,7 @@ 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
|
||||||
):
|
):
|
||||||
|
if not arguments['info'].json:
|
||||||
logger.warning('{}: Displaying summary info for archives'.format(repository))
|
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,
|
||||||
|
|
Loading…
Reference in a new issue