summaryrefslogtreecommitdiffstats
path: root/glances/plugins/glances_plugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'glances/plugins/glances_plugin.py')
-rw-r--r--glances/plugins/glances_plugin.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/glances/plugins/glances_plugin.py b/glances/plugins/glances_plugin.py
index 6c056570..8259ba5f 100644
--- a/glances/plugins/glances_plugin.py
+++ b/glances/plugins/glances_plugin.py
@@ -178,13 +178,13 @@ class GlancesPlugin(object):
def update_stats_history(self):
"""Update stats history."""
- # If the plugin data is a dict, the dict's key should be used
- if self.get_key() is None:
- item_name = ''
- else:
- item_name = self.get_key()
# Build the history
if self.get_export() and self.history_enable():
+ # If the plugin data is a dict, the dict's key should be used
+ if self.get_key() is None:
+ item_name = ''
+ else:
+ item_name = self.get_key()
for i in self.get_items_history_list():
if isinstance(self.get_export(), list):
# Stats is a list of data