1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

[py3] Fixed remaining Python 3 syntax errors.

django.utils.unittest.* weren't touched -- they're only imported on Python 2.6.
This commit is contained in:
Aymeric Augustin
2012-07-20 13:52:16 +02:00
parent 56dbe924a6
commit cacd845996
4 changed files with 7 additions and 5 deletions

View File

@@ -105,6 +105,8 @@ import unittest, difflib, pdb, tempfile
import warnings
from StringIO import StringIO
from django.utils import six
if sys.platform.startswith('java'):
# On Jython, isclass() reports some modules as classes. Patch it.
def patch_isclass(isclass):
@@ -1232,8 +1234,8 @@ class DocTestRunner:
# keyboard interrupts.)
try:
# Don't blink! This is where the user's code gets run.
exec compile(example.source, filename, "single",
compileflags, 1) in test.globs
six.exec_(compile(example.source, filename, "single",
compileflags, 1), test.globs)
self.debugger.set_continue() # ==== Example Finished ====
exception = None
except KeyboardInterrupt: