def load_connection_transport(self, tdnstr):
        """Given a NTDSConnection object which enumerates a transport
        DN, load the transport information for the connection object

        :param tdnstr: transport DN to load
        """
        attrs = [ "objectGUID" ]
        try:
            res = samdb.search(base=tdnstr,
                               scope=ldb.SCOPE_BASE, attrs=attrs)

        except ldb.LdbError, (enum, estr):
            raise Exception("Unable to find transport (%s)" %
                            (tdnstr, estr))

        if "objectGUID" in res[0]:
            self.transport_dnstr = tdnstr
            self.transport_guid = \
                misc.GUID(samdb.schema_format_value("objectGUID",
                                                    msg["objectGUID"][0]))
        assert self.transport_dnstr is not None
        assert self.transport_guid is not None
dataset/ETHPy150Open byt3bl33d3r/pth-toolkit/lib/python2.7/site-packages/samba/kcc_utils.py/NTDSConnection.load_connection_transport/original