fixed log-level in error case (logging error instead of Level 39)

pull/2381/head
sebres 2019-03-15 22:28:08 +01:00
parent ebf2f28294
commit ec2b5dc483
1 changed files with 2 additions and 2 deletions

View File

@ -244,8 +244,8 @@ class Utils():
return False if not output else (False, stdout, stderr, retcode)
std_level = logging.DEBUG if retcode in success_codes else logging.ERROR
if std_level > logSys.getEffectiveLevel():
if logCmd: logCmd(std_level-1); logCmd = None
if std_level >= logSys.getEffectiveLevel():
if logCmd: logCmd(std_level-1 if std_level == logging.DEBUG else logging.ERROR); logCmd = None
# if we need output (to return or to log it):
if output or std_level >= logSys.getEffectiveLevel():