koder aka kdanilov | dda86d3 | 2015-03-16 11:20:04 +0200 | [diff] [blame] | 1 | all_sensors = {} |
2 | |||||
3 | |||||
4 | def provides(sensor_class_name): | ||||
5 | def closure(func): | ||||
6 | assert sensor_class_name not in all_sensors | ||||
7 | all_sensors[sensor_class_name] = func | ||||
8 | return func | ||||
9 | return closure |