summaryrefslogtreecommitdiffstats
path: root/glances/plugins/folders/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'glances/plugins/folders/__init__.py')
-rw-r--r--glances/plugins/folders/__init__.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/glances/plugins/folders/__init__.py b/glances/plugins/folders/__init__.py
index dae16a2d..4bc1302a 100644
--- a/glances/plugins/folders/__init__.py
+++ b/glances/plugins/folders/__init__.py
@@ -138,7 +138,12 @@ class PluginModel(GlancesPluginModel):
return ret
# Max size for the interface name
- name_max_width = max_width - 7
+ if max_width:
+ name_max_width = max_width - 7
+ 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('FOLDERS', width=name_max_width)