summaryrefslogtreecommitdiffstats
path: root/glances/plugins/smart/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'glances/plugins/smart/__init__.py')
-rw-r--r--glances/plugins/smart/__init__.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/glances/plugins/smart/__init__.py b/glances/plugins/smart/__init__.py
index 3cb5376b..644efa04 100644
--- a/glances/plugins/smart/__init__.py
+++ b/glances/plugins/smart/__init__.py
@@ -168,7 +168,12 @@ class PluginModel(GlancesPluginModel):
return ret
# Max size for the interface name
- name_max_width = max_width - 6
+ if max_width:
+ name_max_width = max_width - 6
+ else:
+ # No max_width defined, return an emptu curse message
+ logger.debug("No max_width defined for the {} plugin, it will not be displayed.".format(self.plugin_name))
+ return ret
# Header
msg = '{:{width}}'.format('SMART disks', width=name_max_width)