More clean approach to the verbosity levels in overlay and io.
This commit is contained in:
parent
c85ad530c4
commit
b65e6f83ff
|
@ -160,7 +160,8 @@ def isVL ( level ):
|
||||||
confLevel = 0
|
confLevel = 0
|
||||||
if Cfg.getParamBool('misc.verboseLevel1').asBool(): confLevel = 1
|
if Cfg.getParamBool('misc.verboseLevel1').asBool(): confLevel = 1
|
||||||
if Cfg.getParamBool('misc.verboseLevel2').asBool(): confLevel = 2
|
if Cfg.getParamBool('misc.verboseLevel2').asBool(): confLevel = 2
|
||||||
return confLevel >= level
|
#print( 'level {} <= confLevel {}'.format(level,confLevel))
|
||||||
|
return level <= confLevel
|
||||||
|
|
||||||
|
|
||||||
def vprint ( level, message ):
|
def vprint ( level, message ):
|
||||||
|
|
|
@ -27,6 +27,7 @@ Contains:
|
||||||
|
|
||||||
import Cfg
|
import Cfg
|
||||||
import Hurricane
|
import Hurricane
|
||||||
|
from .io import isVL
|
||||||
|
|
||||||
|
|
||||||
class UpdateSession ( object ):
|
class UpdateSession ( object ):
|
||||||
|
@ -227,7 +228,7 @@ class CfgCache ( object ):
|
||||||
|
|
||||||
def __exit__( self, *args ):
|
def __exit__( self, *args ):
|
||||||
self.apply()
|
self.apply()
|
||||||
self.display()
|
if isVL(2): self.display()
|
||||||
|
|
||||||
def __init__ ( self, path='', priority=None ):
|
def __init__ ( self, path='', priority=None ):
|
||||||
"""Create a new CfgCache with a ``path`` as parent path."""
|
"""Create a new CfgCache with a ``path`` as parent path."""
|
||||||
|
|
Loading…
Reference in New Issue