def StartFlowAndWait(client_id, token=None, timeout=DEFAULT_TIMEOUT, **flow_args):
 flow_urn = flow.GRRFlow.StartFlow(client_id=client_id, token=token, sync=True, **flow_args)
 WaitForFlow(flow_urn, token=token, timeout=timeout)
 return flow_urn

def StartFlowAndWait ( client_id , token = None , timeout = DEFAULT_TIMEOUT , ** flow_args ) : flow_urn = flow . GRRFlow . StartFlow ( client_id = client_id , token = token , sync = True , ** flow_args ) WaitForFlow ( flow_urn , token = token , timeout = timeout ) return flow_urn
runs a flow and waits for it to finish .