Fixed minor typos in type checks for "int"
This commit is contained in:
parent
6e937c0aaf
commit
6e8fa92062
|
@ -1644,7 +1644,7 @@ class Config:
|
||||||
return value
|
return value
|
||||||
elif type == "bool":
|
elif type == "bool":
|
||||||
return _strtobool(str(value).strip())
|
return _strtobool(str(value).strip())
|
||||||
elif type is "int":
|
elif type == "int":
|
||||||
return int(value)
|
return int(value)
|
||||||
elif type == "string":
|
elif type == "string":
|
||||||
return value
|
return value
|
||||||
|
|
|
@ -236,7 +236,7 @@ def get_ini_default_for_type(
|
||||||
return []
|
return []
|
||||||
elif type == "bool":
|
elif type == "bool":
|
||||||
return False
|
return False
|
||||||
elif type is "int":
|
elif type == "int":
|
||||||
return 0
|
return 0
|
||||||
else:
|
else:
|
||||||
return ""
|
return ""
|
||||||
|
|
|
@ -850,8 +850,7 @@ class LoggingPlugin:
|
||||||
if self.log_file_verbose:
|
if self.log_file_verbose:
|
||||||
old_log_file_formatter = self.log_file_handler.formatter
|
old_log_file_formatter = self.log_file_handler.formatter
|
||||||
self.log_file_handler.setFormatter(logging.Formatter())
|
self.log_file_handler.setFormatter(logging.Formatter())
|
||||||
|
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.emit(logging.LogRecord('N/A', logging.WARNING, 'N/A', 0, f"Running at {item.nodeid}", None, None))
|
|
||||||
self.log_file_handler.setFormatter(old_log_file_formatter)
|
self.log_file_handler.setFormatter(old_log_file_formatter)
|
||||||
|
|
||||||
self.log_cli_handler.set_when("setup")
|
self.log_cli_handler.set_when("setup")
|
||||||
|
|
Loading…
Reference in New Issue