From 93f9cf560d1fb66c41b0b17ee043066093dca7a0 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Sat, 15 Jan 2022 15:34:02 +0100 Subject: [PATCH] refactor print_supported_formats --- catcli/catcli.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/catcli/catcli.py b/catcli/catcli.py index 8ba27f7..2f2f6ab 100755 --- a/catcli/catcli.py +++ b/catcli/catcli.py @@ -241,6 +241,12 @@ def main(): print(USAGE) return True + if args['print_supported_formats']: + print('"native": native format') + print('"csv" : CSV format') + print(' {}'.format(Noder.CSV_HEADER)) + return True + # check format fmt = args['--format'] if fmt != 'native' and fmt != 'csv': @@ -292,10 +298,6 @@ def main(): cmd_rename(args, noder, catalog, top) elif args['edit']: cmd_edit(args, noder, catalog, top) - elif args['print_supported_formats']: - print('"native": native format') - print('"csv" : CSV format') - print(' {}'.format(noder.CSV_HEADER)) return True