Ticket #6394: sql_comments.diff
File sql_comments.diff, 637 bytes (added by , 17 years ago) |
---|
-
core/management/sql.py
445 445 fp = open(sql_file, 'U') 446 446 for statement in statements.split(fp.read().decode(settings.FILE_CHARSET)): 447 447 # Remove any comments from the file 448 statement = re.sub(ur"--.* [\n\Z]", "", statement)448 statement = re.sub(ur"--.*([\n\Z]|$)", "", statement) 449 449 if statement.strip(): 450 450 output.append(statement + u";") 451 451 fp.close()