diff options
Diffstat (limited to 'dnsviz/commands/print.py')
-rw-r--r-- | dnsviz/commands/print.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dnsviz/commands/print.py b/dnsviz/commands/print.py index 3dcbb8d..80aa4a5 100644 --- a/dnsviz/commands/print.py +++ b/dnsviz/commands/print.py @@ -43,7 +43,7 @@ import dns.exception, dns.name from dnsviz.analysis import TTLAgnosticOfflineDomainNameAnalysis, DNS_RAW_VERSION from dnsviz.format import latin1_binary_to_string as lb2s -from dnsviz.util import get_trusted_keys, get_default_trusted_keys +from dnsviz.util import get_trusted_keys, get_default_trusted_keys, io_try_buffered # If the import of DNSAuthGraph fails because of the lack of pygraphviz, it # will be reported later @@ -312,8 +312,8 @@ class PrintArgHelper: self.parser = argparse.ArgumentParser(description='Print the assessment of diagnostic DNS queries', prog=prog) # python3/python2 dual compatibility - stdin_buffer = io.open(sys.stdin.fileno(), 'rb', closefd=False) - stdout_buffer = io.open(sys.stdout.fileno(), 'wb', closefd=False) + stdin_buffer = io_try_buffered(sys.stdin, 'rb', closefd=False) + stdout_buffer = io_try_buffered(sys.stdout, 'wb', closefd=False) try: self.parser.add_argument('-f', '--names-file', |