Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Testing a collectd python module
def config_function(config=None):
# do something
pass
def init_function():
# do something
pass
if __name__ == '__main__':
class CollectdDummy:
def register_config(self,a):
# do something
pass
def register_init(self,a):
# do something
pass
def register_read(self,a,b):
# do something
pass
collectd = CollectdDummy()
else:
import collectd
collectd.register_config(config_function)
collectd.register_init(init_function)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment