From 226ad92b81d5ba2d3bcec478af9864bb5ce98801 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Mon, 16 Sep 2019 19:02:14 -0400 Subject: [PATCH] allow - as an outfile for stdout --- hystricomorph.py | 1 + 1 file changed, 1 insertion(+) diff --git a/hystricomorph.py b/hystricomorph.py index e243799..7dd4660 100644 --- a/hystricomorph.py +++ b/hystricomorph.py @@ -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()