コード例 #1
0
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
コード例 #2
0
ファイル: dbusiface.py プロジェクト: CSRedRat/magicicada-gui
 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)