Fix exception in console with python 3 (PY-18189)

This commit is contained in:
Elizaveta Shashkova
2016-01-14 18:34:29 +03:00
parent 13ff33e8d1
commit a73e5d60d8

View File

@@ -201,7 +201,7 @@ def process_exec_queue(interpreter):
except _queue.Empty:
continue
if callable(code_fragment):
if hasattr(code_fragment, '__call__'):
# It can be a callable (i.e.: something that must run in the main
# thread can be put in the queue for later execution).
code_fragment()