def run_command(action, params, sync_daemon_tool): running = yield is_already_running() try: if not running: returned_value[0] = '{ type:"error" reason:"Sync Daemon is not running" }' else: yield run_action(action, params, sync_daemon_tool) except Exception, e: returned_value[0] = '{ type:"error" reason:"Exception: %s" }' % e
def is_sd_started(self): """Find out if SD is active in the system.""" started = yield is_already_running() logger.info("Checking if SD is started: %s", started) defer.returnValue(started)