python3: use six.class_types to check for classes (#36516)
This commit is contained in:
parent
05173ccbfe
commit
f215eda29d
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue