diff options
| author | Riccardo Spagni <ric@spagni.net> | 2015-05-31 16:36:48 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2015-05-31 16:36:48 +0200 |
| commit | 6a1190792b0409e7a996400614e5e2c6ba02e5f6 (patch) | |
| tree | fa324d2f9f02668a6d56d2e4d195a59ab1d3710e /external/unbound/libunbound/python/examples/example8-1.py | |
| parent | ce974949e240a5a3a9fa9c366a7f2c27bae9eff1 (diff) | |
| download | monzero-core-6a1190792b0409e7a996400614e5e2c6ba02e5f6.tar.gz monzero-core-6a1190792b0409e7a996400614e5e2c6ba02e5f6.tar.xz monzero-core-6a1190792b0409e7a996400614e5e2c6ba02e5f6.zip | |
update libunbound
Diffstat (limited to 'external/unbound/libunbound/python/examples/example8-1.py')
| -rw-r--r-- | external/unbound/libunbound/python/examples/example8-1.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/external/unbound/libunbound/python/examples/example8-1.py b/external/unbound/libunbound/python/examples/example8-1.py index ca868e510..723c4060e 100644 --- a/external/unbound/libunbound/python/examples/example8-1.py +++ b/external/unbound/libunbound/python/examples/example8-1.py @@ -33,6 +33,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ''' +from __future__ import print_function import unbound ctx = unbound.ub_ctx() @@ -42,20 +43,20 @@ status, result = ctx.resolve("nic.cz", unbound.RR_TYPE_MX, unbound.RR_CLASS_IN) if status == 0 and result.havedata: print("Result:") print(" raw data:", result.data) - for k in result.data.mx_list: + for k in sorted(result.data.mx_list): print(" priority:%d address:%s" % k) status, result = ctx.resolve("nic.cz", unbound.RR_TYPE_A, unbound.RR_CLASS_IN) if status == 0 and result.havedata: print("Result:") print(" raw data:", result.data) - for k in result.data.address_list: + for k in sorted(result.data.address_list): print(" address:%s" % k) status, result = ctx.resolve("nic.cz", unbound.RR_TYPE_NS, unbound.RR_CLASS_IN) if status == 0 and result.havedata: print("Result:") print(" raw data:", result.data) - for k in result.data.domain_list: + for k in sorted(result.data.domain_list): print(" host: %s" % k) |
