Django

Code

Changeset 3821

Show
Ignore:
Timestamp:
09/25/06 02:36:46 (2 years ago)
Author:
mtredinnick
Message:

Fixed #2729 -- Handle initial SQL with different line-ending styles (Windows
vs. Unix vs. Mac). Thanks, Simon Greenhill.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/core/management.py

    r3811 r3821  
    348348    for sql_file in sql_files: 
    349349        if os.path.exists(sql_file): 
    350             fp = open(sql_file
     350            fp = open(sql_file, 'U'
    351351            for statement in statements.split(fp.read()): 
    352352                if statement.strip(): 
  • django/trunk/tests/regressiontests/initial_sql_regress/sql/simple.sql

    r3180 r3821  
    55INSERT INTO initial_sql_regress_simple (name) VALUES ('Miles O''Brien'); 
    66INSERT INTO initial_sql_regress_simple (name) VALUES ('Semicolon;Man'); 
     7INSERT INTO initial_sql_regress_simple (name) VALUES ('This line has a Windows line ending'); 
    78