From 431b93694d3b3f32612e832328274c908aedca74 Mon Sep 17 00:00:00 2001 From: Cerem Cem ASLAN Date: Mon, 8 Feb 2021 01:21:57 +0300 Subject: [PATCH] JSON output is the default output format. --- btrfs-snapshots-diff.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/btrfs-snapshots-diff.py b/btrfs-snapshots-diff.py index 8cd1ce4..3780408 100755 --- a/btrfs-snapshots-diff.py +++ b/btrfs-snapshots-diff.py @@ -637,17 +637,13 @@ def main(): print(f'{sep}{k}={v}', end='') print() - elif args.json: + else: + # JSON format is default import json # pylint: disable=import-outside-toplevel if args.pretty: print(json.dumps(commands, indent=2)) else: print(json.dumps(commands)) - else: - printerr('No output!\n') - parser.print_help() - - if __name__ == '__main__': main()