mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-09-30 13:44:58 +02:00
- Fix swig and python examples for Python 3.x.
git-svn-id: file:///svn/unbound/trunk@3227 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
@@ -39,9 +39,9 @@ ctx = unbound.ub_ctx()
|
||||
ctx.resolvconf("/etc/resolv.conf")
|
||||
|
||||
def call_back(my_data,status,result):
|
||||
print "Call_back:", my_data
|
||||
print("Call_back:", my_data)
|
||||
if status == 0 and result.havedata:
|
||||
print "Result:", result.data.address_list
|
||||
print("Result:", result.data.address_list)
|
||||
my_data['done_flag'] = True
|
||||
|
||||
|
||||
@@ -53,4 +53,4 @@ while (status == 0) and (not my_data['done_flag']):
|
||||
time.sleep(0.1)
|
||||
|
||||
if (status != 0):
|
||||
print "Resolve error:", unbound.ub_strerror(status)
|
||||
print("Resolve error:", unbound.ub_strerror(status))
|
||||
|
||||
Reference in New Issue
Block a user