diff options
author | Riccardo Spagni <ric@spagni.net> | 2015-05-31 16:38:19 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2015-05-31 16:38:21 +0200 |
commit | 431397abfaf37b28c6981242d7fd59d8e520c8ec (patch) | |
tree | fa324d2f9f02668a6d56d2e4d195a59ab1d3710e /external/unbound/libunbound/python/examples/idn-lookup.py | |
parent | Merge pull request #301 (diff) | |
parent | update libunbound (diff) | |
download | monero-431397abfaf37b28c6981242d7fd59d8e520c8ec.tar.xz |
Merge pull request #302
6a11907 update libunbound (Riccardo Spagni)
Diffstat (limited to 'external/unbound/libunbound/python/examples/idn-lookup.py')
-rw-r--r-- | external/unbound/libunbound/python/examples/idn-lookup.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/external/unbound/libunbound/python/examples/idn-lookup.py b/external/unbound/libunbound/python/examples/idn-lookup.py index 2170637d3..f28315067 100644 --- a/external/unbound/libunbound/python/examples/idn-lookup.py +++ b/external/unbound/libunbound/python/examples/idn-lookup.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 import locale @@ -45,18 +46,18 @@ status, result = ctx.resolve(u"www.háčkyčárky.cz", unbound.RR_TYPE_A, unboun 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(u"háčkyčárky.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_idn: + for k in sorted(result.data.mx_list_idn): print(" priority:%d address:%s" % k) status, result = ctx.resolve(unbound.reverse('217.31.204.66')+'.in-addr.arpa', unbound.RR_TYPE_PTR, unbound.RR_CLASS_IN) if status == 0 and result.havedata: print("Result.data:", result.data) - for k in result.data.domain_list_idn: + for k in sorted(result.data.domain_list_idn): print(" dname:%s" % k) |