pycomedi_demo_args: comment on what happens with lots of verbose args.
authorW. Trevor King <wking@tremily.us>
Wed, 17 Oct 2012 18:38:46 +0000 (14:38 -0400)
committerW. Trevor King <wking@tremily.us>
Wed, 17 Oct 2012 18:45:39 +0000 (14:45 -0400)
For example, if you call

  cmd.py -vvvvvvv

This will set pycomedi.LOG to DEBUG.

  WARN -> INFO
  INFO -> DEBUG
  no-op
  no-op
  etc.

The new comment makes this clearer, because it took me a minute to
understand the implementation ;).

doc/demo/pycomedi_demo_args.py

index 4bd5a895dc2f0bdeec7a02b525388615ed88e5ff..9e09e4a46b8eb88f56ed860117597b4260c68905 100644 (file)
@@ -33,6 +33,7 @@ class _IncrementVerbosityAction (_argparse.Action):
         level -= 10  # e.g. logging.INFO -> logging.DEBUG
         if level >= _logging.DEBUG:
             _LOG.setLevel(level)
+        # otherwise we're already at DEBUG, so don't do anything
 
 
 # name -> (args, kwargs)