From: Bob Halley Date: Tue, 3 May 2011 10:13:31 +0000 (+0100) Subject: py3 port X-Git-Tag: v1.10.0-py3~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ce8f56d867812edac74d09208616801864b86d4;p=thirdparty%2Fdnspython.git py3 port --- diff --git a/examples/zonediff.py b/examples/zonediff.py index ad81fb1d..e080b9b0 100755 --- a/examples/zonediff.py +++ b/examples/zonediff.py @@ -171,10 +171,10 @@ The differences shown will be logical differences, not textual differences. opts.use_vc = opts.use_git or opts.use_bzr or opts.use_rcs def _open(what, err): - if isinstance(what, basestring): + if isinstance(what, str): # Open as normal file try: - return open(what, 'rb') + return open(what, 'r') except: sys.stderr.write(err + "\n") if opts.tracebacks: @@ -264,7 +264,7 @@ The differences shown will be logical differences, not textual differences. if not changes: sys.exit(0) if opts.html: - print format_changes_html(oldn, newn, changes, opts.ignore_ttl) + print(format_changes_html(oldn, newn, changes, opts.ignore_ttl)) else: - print format_changes_plain(oldn, newn, changes, opts.ignore_ttl) + print(format_changes_plain(oldn, newn, changes, opts.ignore_ttl)) sys.exit(1)