From c5e14d6ccfd4aab752ef6edcd44ddc2e656411f0 Mon Sep 17 00:00:00 2001 From: "Martin A. Brown" Date: Fri, 26 Feb 2016 11:24:19 -0800 Subject: [PATCH] "all" is a good default for --list --- tldp/driver.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tldp/driver.py b/tldp/driver.py index d4d4d83..fd99d78 100644 --- a/tldp/driver.py +++ b/tldp/driver.py @@ -18,6 +18,12 @@ def detail(config, args): width = Namespace() width.status = max([len(x) for x in tldp.inventory.status_types]) width.stem = max([len(x) for x in i.source.keys()]) + # -- if user just said "list" with no args, then give the user something + # sane, "all"; it would make sense for this to be "work", too, but + # "all" seems to be less surprising + # + if not args: + args.append('all') for arg in args: status_class = tldp.inventory.status_classes[arg] for status in status_class: @@ -91,10 +97,6 @@ def run(): argv = sys.argv[1:] config, args = tldp.config.collectconfiguration(tag, argv) - # -- first, and foremost, set requested logging level - # - #logger.setLevel(config.loglevel) - # -- check to see if the user wishes to --list things # this function and friends is called 'detail', because # Python reserves a special (fundamental) meaning for the word