[Yum-devel] [PATCH] --quiet: logger.info() should produce no output. BZ 873428.

Zdeněk Pavlas zpavlas at redhat.com
Tue Nov 6 08:34:33 UTC 2012


--quiet sets debug_level=0.  This filters INFO_1 and INFO_2,
but not INFO.  Bump the translated level by one.
---
 yum/logginglevels.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/yum/logginglevels.py b/yum/logginglevels.py
index 14c5e73..ee2f684 100644
--- a/yum/logginglevels.py
+++ b/yum/logginglevels.py
@@ -87,7 +87,7 @@ def logLevelFromErrorLevel(error_level):
 
 def logLevelFromDebugLevel(debug_level):
     """ Convert an old-style debug logging level to the new style. """
-    debug_table = {-1 : __NO_LOGGING, 0 : logging.INFO, 1 : INFO_1, 2 : INFO_2,
+    debug_table = {-1 : __NO_LOGGING, 0 : logging.INFO+1, 1 : INFO_1, 2 : INFO_2,
         3 : logging.DEBUG, 4 : DEBUG_1, 5 : DEBUG_2, 6 : DEBUG_3, 7 : DEBUG_4}
 
     return __convertLevel(debug_level, debug_table)
-- 
1.7.4.4



More information about the Yum-devel mailing list