def test_add(self): def target(p): pass path = '/tmp/file_' + chr(255) monitor = PathMonitor() monitor.add(path, target)
def plugin_loaded(): """ Initialize the plugin. Called (once) immediately after the plugin is loaded. - setup path monitoring. - validate registration. If registered: - setup plugin configuration. """ global path_monitor path = ConsumerIdentity.certpath() path_monitor = PathMonitor() path_monitor.add(path, certificate_changed) path_monitor.start() while True: try: validate_registration() if registered: update_settings() # DONE break except Exception as e: log.warn(str(e)) sleep(60)
def test_add(self): def target(p): pass path = '/tmp/file_' + chr(255) monitor = PathMonitor() monitor.add(path, target)