use sys.stdin.buffer

This commit is contained in:
Spencer Young
2020-03-24 20:30:16 -07:00
parent 3fbef3e02b
commit 5878d0a2c3

View File

@@ -189,7 +189,7 @@ def run(argv=None):
# read yaml from stdin # read yaml from stdin
if args.stdin: if args.stdin:
try: try:
problems = linter.run(sys.stdin, conf, '') problems = linter.run(sys.stdin.buffer, conf, '')
except EnvironmentError as e: except EnvironmentError as e:
print(e, file=sys.stderr) print(e, file=sys.stderr)
sys.exit(-1) sys.exit(-1)