# Path: botoflow/core/exceptions.py
# class CancelledError(Exception):
#     """
#     The Future was cancelled
#     """
# 
#     @property
#     def cause(self):
#         return self


import logging
import six
from .exceptions import CancelledError
        self._execute_tasks()

    def _execute_tasks(self):
        for task in self._tasks:
            task.execute()

    def running(self):
        """
        Returns True if the task is runnning
        """
        return self._state == RUNNING

    def done(self):
        """
        Returns True if the future finished or cancelled
        """
        return self._state in (CANCELLED, FINISHED)

    def cancelled(self):
        """
        Returns True if the task was cancelled
        """
        return self._state == CANCELLED

    def exception(self):
        """
        Returns the exception if available, or a ValueError if a result is
        not yet set
        """
        if self._state == CANCELLED:

# Path: botoflow/core/exceptions.py
# class CancelledError(Exception):
#     """
#     The Future was cancelled
#     """
# 
#     @property
#     def cause(self):
#         return self


# Path: botoflow/core/base_future.py
import logging
import six
from .exceptions import CancelledError

        self._execute_tasks()

    def _execute_tasks(self):
        for task in self._tasks:
            task.execute()

    def running(self):
        """
        Returns True if the task is runnning
        """
        return self._state == RUNNING

    def done(self):
        """
        Returns True if the future finished or cancelled
        """
        return self._state in (CANCELLED, FINISHED)

    def cancelled(self):
        """
        Returns True if the task was cancelled
        """
        return self._state == CANCELLED

    def exception(self):
        """
        Returns the exception if available, or a ValueError if a result is
        not yet set
        """
        if self._state == CANCELLED:

            raise CancelledError()