Skip to content

Commit

Permalink
Removed bogus, ineffective 'U' flag from codecs.open() call.
Browse files Browse the repository at this point in the history
  • Loading branch information
ramiro committed Apr 29, 2014
1 parent 0fb7570 commit 2df7238
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django/core/management/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def custom_sql_for_model(model, style, connection):
sql_files.append(os.path.join(app_dir, "%s.sql" % opts.model_name))
for sql_file in sql_files:
if os.path.exists(sql_file):
with codecs.open(sql_file, 'r' if six.PY3 else 'U', encoding=settings.FILE_CHARSET) as fp:
with codecs.open(sql_file, 'r', encoding=settings.FILE_CHARSET) as fp:
output.extend(connection.ops.prepare_sql_script(fp.read(), _allow_fallback=True))
return output

Expand Down

0 comments on commit 2df7238

Please sign in to comment.