Tried to prevent the RunBuiltinException which seems to be happening in Python2.7 due to threading.hasattr not being set.