def getLocalProtocol(self, connectionIdentifier):
for factory in self.localFactories:<EOL><INDENT>try:<EOL><INDENT>return factory.protocols[connectionIdentifier]<EOL><DEDENT>except KeyError:<EOL><INDENT>continue<EOL><DEDENT><DEDENT>raise NoSuchConnection()<EOL>
Attempts to get a local protocol by connection identifier.