Ticket #8461: sql_py.diff
File sql_py.diff, 666 bytes (added by , 16 years ago) |
---|
-
django/core/management/sql.py
184 184 fp = open(sql_file, 'U') 185 185 for statement in statements.split(fp.read().decode(settings.FILE_CHARSET)): 186 186 # Remove any comments from the file 187 statement = re.sub(ur" --.*([\n\Z]|$)", "", statement)187 statement = re.sub(ur"(--|#).*([\n\Z]|$)", "", statement) 188 188 if statement.strip(): 189 189 output.append(statement + u";") 190 190 fp.close()