Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(14)  |  Call(9)  |  Derive(0)  |  Import(5)

src/p/y/pyon-HEAD/pyon/container/cc.py   pyon(Download)
from pyon.core import bootstrap
from pyon.core.bootstrap import CFG
from pyon.core.exception import ContainerError, BadRequest
from pyon.datastore.datastore import DataStore
from pyon.ion.event import EventPublisher
        for cap in start_order:
            if cap not in self._cap_definitions:
                raise ContainerError("CC capability %s not defined in profile" % cap)
            if cap in self._capabilities or cap in self._cap_instances:
                raise ContainerError("CC capability %s already initialized" % cap)
                        dep = dep.strip()
                        if dep not in self._cap_initialized:
                            raise ContainerError("CC capability %s dependent on non-existing capability %s" % (cap, dep))
                if 'field' in cap_def and cap_def['field']:
                    setattr(self, cap_def['field'], cap_obj)
        profile_cfg = Config([profile_filename]).data
        if not isinstance(profile_cfg, dict) or profile_cfg['type'] != "profile" or not "profile" in profile_cfg:
            raise ContainerError("Container capability profile invalid: %s" % profile_filename)
 
        self.cap_profile = profile_cfg['profile']

src/p/y/pyon-HEAD/pyon/ion/process.py   pyon(Download)
from gevent import greenlet, Timeout
from pyon.util.async import spawn
from pyon.core.exception import IonException, ContainerError
from pyon.core.exception import Timeout as IonTimeout
from pyon.util.containers import get_ion_ts, get_ion_ts_millis
 
                    # have to raise something friendlier on the client side
                    calling_gl.kill(exception=ContainerError(str(exc)), block=False)
            finally:
                self._compute_proc_stats(start_proc_time)

src/p/y/pyon-HEAD/pyon/core/thread.py   pyon(Download)
from pyon.util.async import *
from pyon.util.log import log
from pyon.core.exception import ContainerError
 
import time
        # - we caught an exception
        if not retval:
            raise ContainerError("%s (timed out)" % errmsg)
        elif proc.proc is not None and proc.proc.dead and not proc.proc.successful():
            raise ContainerError("%s (failed): %s" % (errmsg, proc.proc.exception))

src/p/y/pyon-HEAD/pyon/ion/test/test_process.py   pyon(Download)
from pyon.util.int_test import IonIntegrationTestCase
from pyon.util.context import LocalContextMixin
from pyon.core.exception import IonException, NotFound, ContainerError, Timeout as IonTimeout
from pyon.util.async import spawn
from mock import sentinel, Mock, MagicMock, ANY, patch

src/p/y/pyon-HEAD/pyon/core/test/test_thread.py   pyon(Download)
 
from pyon.core.thread import PyonThreadManager, PyonThread
from pyon.core.exception import ContainerError
from pyon.util.int_test import IonIntegrationTestCase
from pyon.util.unit_test import PyonTestCase