Fixed minor typos in type checks for "int"

This commit is contained in:
Ben Nguyen Tran 2024-04-28 13:37:15 -04:00
parent 6e937c0aaf
commit 6e8fa92062
3 changed files with 3 additions and 4 deletions

View File

@ -1644,7 +1644,7 @@ class Config:
return value
elif type == "bool":
return _strtobool(str(value).strip())
elif type is "int":
elif type == "int":
return int(value)
elif type == "string":
return value

View File

@ -236,7 +236,7 @@ def get_ini_default_for_type(
return []
elif type == "bool":
return False
elif type is "int":
elif type == "int":
return 0
else:
return ""

View File

@ -850,8 +850,7 @@ class LoggingPlugin:
if self.log_file_verbose:
old_log_file_formatter = self.log_file_handler.formatter
self.log_file_handler.setFormatter(logging.Formatter())
self.log_file_handler.emit(logging.LogRecord('N/A', logging.WARNING, 'N/A', 0, f"Running at {item.nodeid}", None, None))
self.log_file_handler.emit(logging.LogRecord('N/A', logging.INFO, 'N/A', 0, f"Running at {item.nodeid}", None, None))
self.log_file_handler.setFormatter(old_log_file_formatter)
self.log_cli_handler.set_when("setup")