From: Oleg Broytman Date: Wed, 5 Feb 2014 15:40:26 +0000 (+0400) Subject: Make 'output' an alias for outfile.write X-Git-Tag: v2.3.4~7 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=75fa3299ddbda6c432999a26d16fccf7bccfb34d;p=mimedecode.git Make 'output' an alias for outfile.write --- diff --git a/mimedecode.py b/mimedecode.py index b6f139b..78783ae 100755 --- a/mimedecode.py +++ b/mimedecode.py @@ -30,9 +30,6 @@ Usage: %s [-h|--help] [-V|--version] [-cCDP] [-H|--host=hostname] [-f charset] [ sys.exit(code) -def output(s): - gopts.outfile.write(s) - def output_headers(msg): unix_from = msg.get_unixfrom() if unix_from: @@ -391,6 +388,8 @@ if __name__ == "__main__": gopts.host_name = socket.gethostname() gopts.outfile = outfile + output = outfile.write + decode_file(infile) infile.close()