MCPcopy Create free account
hub / github.com/rthalley/dnspython / __add__

Method __add__

dns/resolver.py:107–117  ·  view source on GitHub ↗

Augment by results from another NXDOMAIN exception.

(self, e_nx)

Source from the content-addressed store, hash-verified

105 return self.kwargs["qnames"][0]
106
107 def __add__(self, e_nx):
108 """Augment by results from another NXDOMAIN exception."""
109 qnames0 = list(self.kwargs.get("qnames", []))
110 responses0 = dict(self.kwargs.get("responses", {}))
111 responses1 = e_nx.kwargs.get("responses", {})
112 for qname1 in e_nx.kwargs.get("qnames", []):
113 if qname1 not in qnames0:
114 qnames0.append(qname1)
115 if qname1 in responses1:
116 responses0[qname1] = responses1[qname1]
117 return NXDOMAIN(qnames=qnames0, responses=responses0)
118
119 def qnames(self):
120 """All of the names that were tried.

Callers

nothing calls this directly

Calls 2

NXDOMAINClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected