Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dnsviz/dnsviz.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dnsviz/commands/grok.py')
-rw-r--r--dnsviz/commands/grok.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/dnsviz/commands/grok.py b/dnsviz/commands/grok.py
index 6f2d8cd..8fc77c3 100644
--- a/dnsviz/commands/grok.py
+++ b/dnsviz/commands/grok.py
@@ -43,7 +43,7 @@ import dns.exception, dns.name
from dnsviz.analysis import OfflineDomainNameAnalysis, DNS_RAW_VERSION
from dnsviz.format import latin1_binary_to_string as lb2s
-from dnsviz.util import get_trusted_keys
+from dnsviz.util import get_trusted_keys, io_try_buffered
# If the import of DNSAuthGraph fails because of the lack of pygraphviz, it
# will be reported later
@@ -170,8 +170,8 @@ class GrokArgHelper:
self.parser = argparse.ArgumentParser(description='Assess 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',