lib/write-mime-multipart in aws-kicker-0.0.4 vs lib/write-mime-multipart in aws-kicker-0.0.5

- old
+ new

@@ -1,6 +1,6 @@ -#!/usr/bin/python2.6 +#!/usr/bin/python # largely taken from python examples # http://docs.python.org/library/email-examples.html import os import sys @@ -46,13 +46,13 @@ #outer['To'] = COMMASPACE.join(opts.recipients) #outer['From'] = opts.sender #outer.preamble = 'You will not see this in a MIME-aware mail reader.\n' parser = OptionParser() - + parser.add_option("-o", "--output", dest="output", - help="write output to FILE [default %default]", metavar="FILE", + help="write output to FILE [default %default]", metavar="FILE", default="-") parser.add_option("-z", "--gzip", dest="compress", action="store_true", help="compress output", default=False) parser.add_option("-d", "--default", dest="deftype", help="default mime type [default %default]", default="text/plain") @@ -96,15 +96,15 @@ if options.output is "-": ofile = sys.stdout else: ofile = file(options.output,"wb") - + if options.base64: output = b64encode(outer.as_string()) else: output = outer.as_string() - + if options.compress: gfile = gzip.GzipFile(fileobj=ofile, filename = options.output ) gfile.write(output) gfile.close() else: