python3: use six.class_types to check for classes (#36516)

This commit is contained in:
Frédéric Péters 2019-09-29 20:52:08 +02:00
parent 05173ccbfe
commit f215eda29d
1 changed files with 3 additions and 2 deletions

View File

@ -17,6 +17,7 @@
import threading
import types
from django.utils import six
from django.utils.six.moves.urllib import parse as urlparse
import quixote
@ -88,7 +89,7 @@ def cleanup():
_thread_local.publisher = None
for key, value in locals().items():
if type(value) in (types.FunctionType, types.TypeType, types.ClassType):
for key, value in list(locals().items()):
if type(value) in (types.FunctionType,) + six.class_types:
setattr(quixote, key, value)
setattr(quixote.publish, key, value)