# Path: pyhaystack/util/asyncexc.py
# class AsynchronousException(object):
#     def __init__(self):
#         self._exc_info = exc_info()
# 
#     def reraise(self):
#         reraise(*self._exc_info)
# 
# Path: pyhaystack/util/state.py
# @property
# def state(self):
#     """
#     Return the current state machine's state.
#     """
#     return self._state_machine.current


from ...util.asyncexc import AsynchronousException
from ...util import state
import fysom
        try:
            if self._need_ops:
                self._log.debug("Retrieving ops data")
                self._session.ops(callback=self._on_got_ops, cache=self._cache)
            else:
                self._log.debug("Skipping ops data")
                self._state_machine.ops_done()
        except:  # Catch all exceptions to pass to caller.
            self._state_machine.exception(result=AsynchronousException())

    def _on_got_ops(self, operation, **kwargs):
        """
        Store the result of the "ops" request.
        """
        try:
            self._ops = operation.result
            for row in self._ops:
                self._ops_data[row["name"]] = row
            self._log.debug("Got ops data: %s", self._ops_data)
            self._state_machine.ops_done()
        except:  # Catch all exceptions to pass to caller.
            self._state_machine.exception(result=AsynchronousException())

    def _do_check_features(self, event):
        """
        Check whether the features are present.
        """
        try:
            result = self._check_features()
        except:  # Catch all exceptions to pass to caller.

# Path: pyhaystack/util/asyncexc.py
# class AsynchronousException(object):
#     def __init__(self):
#         self._exc_info = exc_info()
# 
#     def reraise(self):
#         reraise(*self._exc_info)
# 
# Path: pyhaystack/util/state.py
# @property
# def state(self):
#     """
#     Return the current state machine's state.
#     """
#     return self._state_machine.current


# Path: pyhaystack/client/ops/feature.py
from ...util.asyncexc import AsynchronousException
from ...util import state
import fysom

        try:
            if self._need_ops:
                self._log.debug("Retrieving ops data")
                self._session.ops(callback=self._on_got_ops, cache=self._cache)
            else:
                self._log.debug("Skipping ops data")
                self._state_machine.ops_done()
        except:  # Catch all exceptions to pass to caller.
            self._state_machine.exception(result=AsynchronousException())

    def _on_got_ops(self, operation, **kwargs):
        """
        Store the result of the "ops" request.
        """
        try:
            self._ops = operation.result
            for row in self._ops:
                self._ops_data[row["name"]] = row
            self._log.debug("Got ops data: %s", self._ops_data)
            self._state_machine.ops_done()
        except:  # Catch all exceptions to pass to caller.
            self._state_machine.exception(result=AsynchronousException())

    def _do_check_features(self, event):
        """
        Check whether the features are present.
        """
        try:
            result = self._check_features()
        except:  # Catch all exceptions to pass to caller.

            self._state_machine.exception(result=AsynchronousException())