]> git.phdru.name Git - mimedecode.git/commitdiff
Make 'output' an alias for outfile.write
authorOleg Broytman <phd@phdru.name>
Wed, 5 Feb 2014 15:40:26 +0000 (19:40 +0400)
committerOleg Broytman <phd@phdru.name>
Wed, 5 Feb 2014 15:40:26 +0000 (19:40 +0400)
mimedecode.py

index b6f139b6974ba2cb141d9c6999085cfdce22a02a..78783ae6e2e7ffe930d5db226d54851e2433f7fe 100755 (executable)
@@ -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()