mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
set_verbosity(): do something reasonable for out-of-range verbosity
levels. (Previously, -vvv would be the same as -q!)
This commit is contained in:
parent
351a7dd64a
commit
a85dbeb61f
1 changed files with 3 additions and 3 deletions
|
@ -53,9 +53,9 @@ def set_threshold(level):
|
|||
_global_log.threshold = level
|
||||
|
||||
def set_verbosity(v):
|
||||
if v == 0:
|
||||
if v <= 0:
|
||||
set_threshold(WARN)
|
||||
if v == 1:
|
||||
elif v == 1:
|
||||
set_threshold(INFO)
|
||||
if v == 2:
|
||||
elif v >= 2:
|
||||
set_threshold(DEBUG)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue