More clean approach to the verbosity levels in overlay and io.

This commit is contained in:
Jean-Paul Chaput 2022-12-16 17:17:30 +01:00
parent c85ad530c4
commit b65e6f83ff
2 changed files with 4 additions and 2 deletions

View File

@ -160,7 +160,8 @@ def isVL ( level ):
confLevel = 0
if Cfg.getParamBool('misc.verboseLevel1').asBool(): confLevel = 1
if Cfg.getParamBool('misc.verboseLevel2').asBool(): confLevel = 2
return confLevel >= level
#print( 'level {} <= confLevel {}'.format(level,confLevel))
return level <= confLevel
def vprint ( level, message ):

View File

@ -27,6 +27,7 @@ Contains:
import Cfg
import Hurricane
from .io import isVL
class UpdateSession ( object ):
@ -227,7 +228,7 @@ class CfgCache ( object ):
def __exit__( self, *args ):
self.apply()
self.display()
if isVL(2): self.display()
def __init__ ( self, path='', priority=None ):
"""Create a new CfgCache with a ``path`` as parent path."""