File tree 1 file changed +7
-6
lines changed 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -110,12 +110,13 @@ def get_stats_functions_from_conf(func_key_name, conf):
110
110
"""Finds the statistics function configured, and ensures that the callables
111
111
are found from metrics_gatherer.py."""
112
112
stats_functions = []
113
- for func_name , call_interval in conf [func_key_name ]:
114
- stats_func = getattr (metrics_gatherer , func_name )
115
- if not stats_func or not callable (stats_func ):
116
- raise Exception ("statistics function '" + func_name +
117
- "' not found in configuration under key name: " + func_key_name )
118
- stats_functions .append ((stats_func , int (call_interval )))
113
+ if func_key_name in conf and conf [func_key_name ] is not None :
114
+ for func_name , call_interval in conf [func_key_name ]:
115
+ stats_func = getattr (metrics_gatherer , func_name )
116
+ if not stats_func or not callable (stats_func ):
117
+ raise Exception ("statistics function '" + func_name +
118
+ "' not found in configuration under key name: " + func_key_name )
119
+ stats_functions .append ((stats_func , int (call_interval )))
119
120
return stats_functions
120
121
121
122
You can’t perform that action at this time.
0 commit comments