def matchesExistingTransferRequest(self, phedexDataSvc):
    '\n        _matchesExistingTransferRequest_\n\n        Check the given phedex data service to verify if an unapproved\n        transfer request equal to this subscription is already in the system.\n        '
    if ((len(self.datasetPaths) != 1) or (len(self.nodes) != 1)):
        msg = 'matchesExistingTransferRequest can only run in single node/dataset subscriptions'
        raise PhEDExSubscriptionException(msg)
    if (self.level != 'dataset'):
        msg = 'matchesExistingTransferRequest is only supported by dataset subscriptions'
        raise PhEDExSubscriptionException(msg)
    node = next(iter(self.nodes))
    dataset = next(iter(self.datasetPaths))
    existingRequests = phedexDataSvc.getRequestList(dataset=dataset, node=node, decision='pending')['phedex']['request']
    for request in existingRequests:
        requestId = request['id']
        requestInfo = phedexDataSvc.getTransferRequests(request=requestId)['phedex']['request']
        if (not requestInfo):
            logging.error("Transfer request %s doesn't exist in PhEDEx", requestId)
            continue
        requestInfo = requestInfo[0]
        destinations = requestInfo['destinations']['node']
        for nodeInfo in destinations:
            if (nodeInfo['name'] == node):
                break
        else:
            continue
        phedexRequest = PhEDExSubscription(self.datasetPaths, self.nodes, self.group, self.level, requestInfo['priority'], requestInfo['move'], requestInfo['static'], requestInfo['custodial'], self.request_only)
        if self.isEqualOptions(phedexRequest):
            return True
    return False
_matchesExistingTransferRequest_

Check the given phedex data service to verify if an unapproved
transfer request equal to this subscription is already in the system.
def matchesExistingTransferRequest(self, phedexDataSvc):
    '\n        _matchesExistingTransferRequest_\n\n        Check the given phedex data service to verify if an unapproved\n        transfer request equal to this subscription is already in the system.\n        '
    if ((len(self.datasetPaths) != 1) or (len(self.nodes) != 1)):
        msg = 'matchesExistingTransferRequest can only run in single node/dataset subscriptions'
        raise PhEDExSubscriptionException(msg)
    if (self.level != 'dataset'):
        msg = 'matchesExistingTransferRequest is only supported by dataset subscriptions'
        raise PhEDExSubscriptionException(msg)
    node = next(iter(self.nodes))
    dataset = next(iter(self.datasetPaths))
    existingRequests = phedexDataSvc.getRequestList(dataset=dataset, node=node, decision='pending')['phedex']['request']
    for request in existingRequests:
        requestId = request['id']
        requestInfo = phedexDataSvc.getTransferRequests(request=requestId)['phedex']['request']
        if (not requestInfo):
            logging.error("Transfer request %s doesn't exist in PhEDEx", requestId)
            continue
        requestInfo = requestInfo[0]
        destinations = requestInfo['destinations']['node']
        for nodeInfo in destinations:
            if (nodeInfo['name'] == node):
                break
        else:
            continue
        phedexRequest = PhEDExSubscription(self.datasetPaths, self.nodes, self.group, self.level, requestInfo['priority'], requestInfo['move'], requestInfo['static'], requestInfo['custodial'], self.request_only)
        if self.isEqualOptions(phedexRequest):
            return True
    return False