From 2df7238512ecb9c19922a288592f4edfac1df43f Mon Sep 17 00:00:00 2001 From: Ramiro Morales Date: Tue, 29 Apr 2014 07:46:54 -0300 Subject: [PATCH] Removed bogus, ineffective 'U' flag from codecs.open() call. --- django/core/management/sql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/core/management/sql.py b/django/core/management/sql.py index 4832f27b07..841f55de0e 100644 --- a/django/core/management/sql.py +++ b/django/core/management/sql.py @@ -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