allow - as an outfile for stdout

This commit is contained in:
Kelvin Sherlock 2019-09-16 19:02:14 -04:00
parent df757224ed
commit 226ad92b81
1 changed files with 1 additions and 0 deletions

View File

@ -325,6 +325,7 @@ def main():
data = read_stdin()
outfd = sys.stdout
if outfile == "-": outfile = None
if outfile: outfd = open(outfile, "w")
process(data, name, outfd)
if outfile: outfd.close()