Commits

TK Soh  committed 8b9e97d

gpopen: support binary output in case of non-buffered (python -u) mode

  • Participants
  • Parent commits 1d6964c

Comments (0)

Files changed (1)

File tortoise/gpopen.py

             while pop.poll() == None:
                 out = pop.stdout.readline()
                 bytes += len(out)
+                out = out.replace('\n', '\r\n') # fileter LF for binary output
                 self.out_text(out)
             out = pop.stdout.read()
             bytes += len(out)
+            out = out.replace('\n', '\r\n')     # fileter LF for binary output
             self.out_text(out)
             print "run_program: popen closed"
         except IOError: