summaryrefslogtreecommitdiff
path: root/examples/doh.py
diff options
context:
space:
mode:
authorBrian Wellington <bwelling@xbill.org>2020-01-07 13:03:13 -0800
committerBrian Wellington <bwelling@xbill.org>2020-01-07 13:03:13 -0800
commit7ec39e21ab0a6761a34ec405a4a59dc4ebe54924 (patch)
tree61a5e0db5d3e733e95c87d35ed2c04a73e99f3ba /examples/doh.py
parent0ed99480529ecf3217738fe671a31dddd3360e48 (diff)
downloaddnspython-7ec39e21ab0a6761a34ec405a4a59dc4ebe54924.tar.gz
DoH cleanup.
Diffstat (limited to 'examples/doh.py')
-rw-r--r--examples/doh.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/doh.py b/examples/doh.py
index 01c562f..eff9ae7 100644
--- a/examples/doh.py
+++ b/examples/doh.py
@@ -18,7 +18,7 @@ def main():
# one method is to use context manager, session will automatically close
with requests.sessions.Session() as session:
q = dns.message.make_query(qname, dns.rdatatype.A)
- r = dns.query.https(q, where, session)
+ r = dns.query.https(q, where, session=session)
for answer in r.answer:
print(answer)
@@ -29,7 +29,7 @@ def main():
# second method, close session manually
session = requests.sessions.Session()
q = dns.message.make_query(qname, dns.rdatatype.A)
- r = dns.query.https(q, where, session)
+ r = dns.query.https(q, where, session=session)
for answer in r.answer:
print(answer)