Skip to content

Commit 2820cf8

Browse files
committed
Update example in README.md
1 parent fe3227b commit 2820cf8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ import sys
2828
import io
2929
3030
class MyHandler(pdns.remotebackend.Handler):
31-
def do_lookup(self,args):
31+
def do_lookup(self, qname='', qtype='', **kwargs):
3232
self.result =  []
3333
self.log.append("Handling a new DNS request")
34-
if (args['qname'] == 'test.com' and args['qtype'] == 'ANY'):
34+
if (qname == 'test.com' and qtype == 'ANY'):
3535
self.result.append(self.record('test.com','A','127.0.0.1',ttl=300))
36-
if (args['qname'] == 'test.com' and (args['qtype'] == 'ANY' or args['qtype'] == 'SOA')):
36+
if (qname == 'test.com' and (qtype == 'ANY' or qtype == 'SOA')):
3737
self.result.append(self.record('test.com','A','127.0.0.1',ttl=300))
3838
self.result.append(self.record('test.com','SOA','sns.dns.icann.org. noc.dns.icann.org. 2013073082 7200 3600 1209600 3600',ttl=300))
3939

0 commit comments

Comments
 (0)