add global verbosity

This commit is contained in:
Ville Rantanen
2020-06-18 20:56:18 +03:00
parent 0fea6b58e2
commit 8156ff57a2

10
flit.py
View File

@@ -35,6 +35,14 @@ def parse_opts():
action = _HelpAction, action = _HelpAction,
help = 'Show this help message and exit' help = 'Show this help message and exit'
) )
parser.add_argument(
'--verbose', '-v',
action = "store_true",
dest = "verbose",
default = False,
help = 'Increase verbosity'
)
parser.add_argument( parser.add_argument(
'--root', '-r', '--root', '-r',
action = "store", action = "store",
@@ -155,7 +163,7 @@ if __name__ == '__main__':
print(opts.root + "/" + new_name) print(opts.root + "/" + new_name)
if opts.command == "list" or opts.command == None: if opts.command == "list" or opts.command == None:
list_folders(opts.root, opts.verbose) list_folders(opts.root, opts.verbose == True)
if opts.command == "del": if opts.command == "del":
del_due_folders() del_due_folders()