Fix broken format string in debug messages

This commit is contained in:
Alessio Sergi
2015-11-07 11:27:27 +01:00
parent 4721b43dc6
commit 65fc555f76
2 changed files with 3 additions and 6 deletions

View File

@@ -80,8 +80,7 @@ class Plugin(GlancesPlugin):
self.stats['mask_cidr'] = self.ip_to_cidr(self.stats['mask'])
self.stats['gateway'] = netifaces.gateways()['default'][netifaces.AF_INET][0]
except (KeyError, AttributeError) as e:
logger.debug("Can not grab IP information (%s)".format(e))
logger.debug("Cannot grab IP information: {0}".format(e))
elif self.input_method == 'snmp':
# Not implemented yet
pass

View File

@@ -99,8 +99,7 @@ class GlancesPlugin(object):
ret = None
if self.args is not None and self.args.enable_history and self.get_items_history_list() is not None:
init_list = [i['name'] for i in self.get_items_history_list()]
logger.debug("Stats history activated for plugin {0} (items: {0})".format(
self.plugin_name, init_list))
logger.debug("Stats history activated for plugin {0} (items: {1})".format(self.plugin_name, init_list))
ret = {}
return ret
@@ -108,8 +107,7 @@ class GlancesPlugin(object):
"""Reset the stats history (dict of list)."""
if self.args is not None and self.args.enable_history and self.get_items_history_list() is not None:
reset_list = [i['name'] for i in self.get_items_history_list()]
logger.debug("Reset history for plugin {0} (items: {0})".format(
self.plugin_name, reset_list))
logger.debug("Reset history for plugin {0} (items: {1})".format(self.plugin_name, reset_list))
self.stats_history = {}
def update_stats_history(self, item_name=''):