'Try to schedule the next pathspec if there is enough capacity.'

def _TryToStartNextPathspec(self):

    if (self.state.maximum_pending_files <= len(self.state.pending_files)):
        return
    if (self.state.maximum_pending_files <= len(self.state.pending_hashes)):
        return
    try:
        index = self.state.next_pathspec_to_start
        pathspec = self.state.indexed_pathspecs[index]
        self.state.next_pathspec_to_start = (index + 1)
    except IndexError:
        return
    self.state.pending_hashes[index] = {'index': index}
    self.CallClient(server_stubs.StatFile, pathspec=pathspec, next_state='StoreStat', request_data=dict(index=index))
    request = rdf_client.FingerprintRequest(pathspec=pathspec, max_filesize=self.state.file_size)
    request.AddRequest(fp_type=rdf_client.FingerprintTuple.Type.FPT_GENERIC, hashers=[rdf_client.FingerprintTuple.HashType.MD5, rdf_client.FingerprintTuple.HashType.SHA1, rdf_client.FingerprintTuple.HashType.SHA256])
    self.CallClient(server_stubs.HashFile, request, next_state='ReceiveFileHash', request_data=dict(index=index))
