Commits

Andrew Godwin  committed 0c4cfc9 Merge
  • Participants
  • Parent commits 7b6cdb6, dc4114b

Comments (0)

Files changed (1)

File south/migration/migrators.py

 from copy import copy, deepcopy
 import datetime
 import inspect
-import io
 import sys
 import traceback
+try:
+    from cStringIO import StringIO # python 2
+except ImportError:
+    from io import StringIO # python 3
 
 from django.core.management import call_command
 from django.core.management.commands import loaddata
         old_debug, old_dry_run = south.db.db.debug, south.db.db.dry_run
         south.db.db.debug = south.db.db.dry_run = True
         stdout = sys.stdout
-        sys.stdout = io.StringIO()
+        sys.stdout = StringIO()
         try:
             try:
                 self.backwards(migration)()