Commits

JanKanis committed ee2b105

minor fix

Comments (0)

Files changed (1)

         # argument, so for python 2 we need to wrap or reopen the
         # output. The input files are already read as utf-8 by the
         # respective libraries.
-
+        #
         # One option is using codecs, but the codecs' writelines()
         # method doesn't support streaming but collects all output and
         # writes at once (see Python issues #5445 and #21910). On the
         # significantly).
 
         # args.output = codecs.getwriter('utf-8')(args.output)
+        # def fixed_writelines(iter, self=args.output):
+        #     for i in iter:
+        #         self.write(i)
+        # args.output.writelines = fixed_writelines
+
+        args.output.close()
         args.output = io.open(args.output.name, 'w')
     
     templatedir, templatename = path.split(args.template.name)