mirror of https://github.com/nicolargo/glances.git
Improve error message
This commit is contained in:
parent
7c074902b3
commit
a8d1ba5e43
|
|
@ -297,5 +297,9 @@ def get_stat_from_path(stats, stat_path):
|
|||
else:
|
||||
ret = get_stat_from_path(match_dict, stat_path[1:])
|
||||
else:
|
||||
ret = get_stat_from_path(stats[stat_path[0]], stat_path[1:])
|
||||
try:
|
||||
ret = get_stat_from_path(stats[stat_path[0]], stat_path[1:])
|
||||
except TypeError:
|
||||
logger.error(
|
||||
'Multiple {}, please select one using {}=<foo>'.format(stat_path[0], stat_path[0]))
|
||||
return ret
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ class GlancesStdout(object):
|
|||
get_stat_from_path(stats.get_plugin(plugin).get_export(),
|
||||
stat_path)))
|
||||
else:
|
||||
logger.error('Plugin {} does not exist or is disabled'.format(plugin))
|
||||
continue
|
||||
|
||||
# Wait until next refresh
|
||||
|
|
|
|||
Loading…
Reference in New Issue