Fix 'Thread object has no attribute _children' error on my machine.

While I ran spartan on my desktop machine. It reports: 
"AttributeError: 'Thread' object has no attribute '_children'".

I guess it's because the version of library. Fixed this by adding two lines of code: 
"
if not hasattr(threading.current_thread(), "_children"):
 threading.current_thread()._children = weakref.WeakKeyDictionary()
"