Martin von Löwis committed 0d79002

Open SQL files in binary+universal-readlines mode.
XXX for 3.x, it would be better to open them in text mode with the desired encoding.

Comments (0)

Files changed (1)


                  os.path.join(app_dir, "%s.sql" % opts.object_name.lower())]
     for sql_file in sql_files:
         if os.path.exists(sql_file):
-            fp = open(sql_file, 'U')
+            fp = open(sql_file, 'rbU')
             for statement in statements.split(
                 # Remove any comments from the file
                 statement = re.sub(ur"--.*([\n\Z]|$)", "", statement)