Correct an issue with events type name (unattended _ in the name)

This commit is contained in:
nicolargo 2025-11-08 19:34:31 +01:00
parent 5efa3a01a3
commit b75d1f24c3
2 changed files with 3 additions and 2 deletions

View File

@ -271,6 +271,7 @@ class GlancesEventsList:
event_time, event_index, event_state, event_type, event_value, proc_list, proc_desc, global_message
)
# logger.info(self.events_list)
return self.len()
def _create_event(self, event_time, event_state, event_type, event_value, proc_desc, global_message):

View File

@ -669,9 +669,9 @@ class GlancesPluginModel:
def get_stat_name(self, header=None, action_key=None):
"""Return the stat name with an optional header and action_key"""
ret = self.plugin_name
if header is not None:
if header is not None and header != '':
ret += '_' + header
if action_key is not None:
if action_key is not None and action_key != '':
ret += '_' + action_key
return ret