Verbose message if the MatPlotLib lib is not installed - issue #428

This commit is contained in:
Nicolargo 2014-10-12 15:03:33 +02:00
parent 3b2d6eb21c
commit 7edcd3e467

View File

@ -515,7 +515,12 @@ class GlancesCurses(object):
self.display_popup(_("Reset history")) self.display_popup(_("Reset history"))
self.glances_history.reset(stats) self.glances_history.reset(stats)
elif (self.history_tag or self.reset_history_tag) and not self.args.enable_history: elif (self.history_tag or self.reset_history_tag) and not self.args.enable_history:
try:
self.glances_history.graph_enabled()
except:
self.display_popup(_("History disabled\nEnable it using --enable-history")) self.display_popup(_("History disabled\nEnable it using --enable-history"))
else:
self.display_popup(_("History disabled\nPlease install MatPlotLib"))
self.history_tag = False self.history_tag = False
self.reset_history_tag = False self.reset_history_tag = False