diff options
| author | Bob Halley <halley@nominum.com> | 2011-05-03 11:13:31 +0100 |
|---|---|---|
| committer | Bob Halley <halley@nominum.com> | 2011-05-03 11:13:31 +0100 |
| commit | 7ce8f56d867812edac74d09208616801864b86d4 (patch) | |
| tree | c80c7ce1a0f50db7ae845a0db5da7f935c8859ce /examples | |
| parent | d86a4f17d7f374d32de6c10ae681ccb5b69e558e (diff) | |
| download | dnspython-7ce8f56d867812edac74d09208616801864b86d4.tar.gz | |
py3 port
Diffstat (limited to 'examples')
| -rwxr-xr-x | examples/zonediff.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/zonediff.py b/examples/zonediff.py index ad81fb1..e080b9b 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) |
