# Path: opencenteragent/utils.py
# def detailed_exception():
#     exc_type, exc_value, exc_traceback = sys.exc_info()
#     full_traceback = repr(
#         traceback.format_exception(
#             exc_type, exc_value, exc_traceback))
# 
#     return full_traceback


import base64
import json
import logging
import os
import random
import time
from opencenteragent.utils import detailed_exception
from opencenterclient.client import OpenCenterEndpoint
from state import StateMachine, StateMachineState
from primitives import OrchestratorTasks
    ns['result_str'] = 'fail'
    ns['result_code'] = 254
    ns['result_data'] = {}
    ns['sm_description'] = adventure_dsl

    LOG.debug('About to run the following dsl: %s' % adventure_dsl)

    node_list = {}

    ns['input_data']['fails'] = []

    for node in initial_state['nodes']:
        node_list[int(node)] = 'ok'
        attr_obj = ep.attrs.new()
        attr_obj.node_id = node
        attr_obj.key = 'last_task'
        attr_obj.value = 'ok'
        attr_obj.save()

    try:
        exec '(result_data, state_data) = ' \
            'tasks.sm_eval(sm_description, input_data)' in ns, ns
    except Exception as e:
        for node in node_list.keys():
            attr_obj = ep.attrs.new()
            attr_obj.node_id = node
            attr_obj.key = 'last_task'
            attr_obj.value = 'failed'
            attr_obj.save()


# Path: opencenteragent/utils.py
# def detailed_exception():
#     exc_type, exc_value, exc_traceback = sys.exc_info()
#     full_traceback = repr(
#         traceback.format_exception(
#             exc_type, exc_value, exc_traceback))
# 
#     return full_traceback


# Path: opencenteragent/plugins/output/plugin_adventurator.py
import base64
import json
import logging
import os
import random
import time
from opencenteragent.utils import detailed_exception
from opencenterclient.client import OpenCenterEndpoint
from state import StateMachine, StateMachineState
from primitives import OrchestratorTasks

    ns['result_str'] = 'fail'
    ns['result_code'] = 254
    ns['result_data'] = {}
    ns['sm_description'] = adventure_dsl

    LOG.debug('About to run the following dsl: %s' % adventure_dsl)

    node_list = {}

    ns['input_data']['fails'] = []

    for node in initial_state['nodes']:
        node_list[int(node)] = 'ok'
        attr_obj = ep.attrs.new()
        attr_obj.node_id = node
        attr_obj.key = 'last_task'
        attr_obj.value = 'ok'
        attr_obj.save()

    try:
        exec '(result_data, state_data) = ' \
            'tasks.sm_eval(sm_description, input_data)' in ns, ns
    except Exception as e:
        for node in node_list.keys():
            attr_obj = ep.attrs.new()
            attr_obj.node_id = node
            attr_obj.key = 'last_task'
            attr_obj.value = 'failed'
            attr_obj.save()


        return _retval(1, result_data=detailed_exception())