X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=mimedecode.py;h=34c495f1cb9be2c9f1f4063a9465730aa47c8b80;hb=038d41eaa2ab37dba4988904463aac7bda5151e6;hp=f46165b23936cf100e432c44640d0bf293496ac0;hpb=44fab1065b5918a09093798b2279ebb2852ad169;p=mimedecode.git diff --git a/mimedecode.py b/mimedecode.py index f46165b..34c495f 100755 --- a/mimedecode.py +++ b/mimedecode.py @@ -389,6 +389,10 @@ if __name__ == "__main__": else: usage(1, 'Too many arguments') + if (infile is sys.stdin) and (outfile is sys.stdout) and \ + sys.stdin.isatty() and sys.stdout.isatty(): + usage(1, 'Filtering from console to console is forbidden') + gopts.outfile = outfile decode_file(infile)