Project

General

Profile

« Previous | Next » 

Revision 7652

csv2db: Open input stream in universal newlines mode to support files with \r as the line ending

View differences:

bin/csv2db
49 49
    # Loads data into the table using the currently-selected approach.
50 50
    def load():
51 51
        # Open input stream
52
        proc = subprocess.Popen(input_cmd, stdout=subprocess.PIPE, bufsize=-1)
52
        proc = subprocess.Popen(input_cmd, stdout=subprocess.PIPE, bufsize=-1,
53
            universal_newlines=True)
53 54
        in_ = proc.stdout
54 55
        
55 56
        # Import data

Also available in: Unified diff