Did I find the right examples for you? yes no

All Samples(8)  |  Call(3)  |  Derive(0)  |  Import(5)

src/l/o/longaccess-client-HEAD/lacli/login.py   longaccess-client(Download)
from lacli.log import getLogger
from lacli.exceptions import ApiNoSessionError
from lacore.exceptions import (ApiAuthException, ApiErrorException,
                               ApiUnavailableException)
from twisted.internet import defer
            self.username = self.password = None
            getLogger().debug("auth failure", exc_info=True)
            raise ApiAuthException(username=username, exc=e)
 
    @command()

src/l/a/lacore-0.1.3/lacore/api.py   lacore(Download)
from urlparse import urljoin
from lacore import get_client_info
from lacore.decorators import cached_property, contains
from lacore.async import deferred_property, block
from lacore.exceptions import (ApiAuthException, UploadEmptyError,
        def get_content(self, r):
            if r.code == 401:
                yield failure.Failure(ApiAuthException())
            if r.code == 404:
                yield failure.Failure(ApiUnavailableException())

src/l/o/longaccess-client-HEAD/lacli/server/error.py   longaccess-client(Download)
from lacore.exceptions import ApiAuthException, BaseAppException
from lacli.exceptions import PauseEvent
from lacli.server.interface.ClientInterface.ttypes import InvalidOperation
from lacli.server.interface.ClientInterface.ttypes import ErrorType
from lacli.log import getLogger

src/l/a/lacore-0.1.3/lacore/t/test_api_async.py   lacore(Download)
from mock import patch, Mock
from twisted.internet import defer
from lacore.exceptions import (ApiAuthException, ApiUnavailableException,
                               ApiErrorException)
from lacore.t.test_api import LA_ENDPOINTS_RESPONSE, LA_CAPSULES_RESPONSE

src/l/a/lacore-0.1.3/lacore/t/test_api.py   lacore(Download)
from testtools import TestCase, ExpectedException
from mock import Mock, patch
from itertools import repeat
from . import makeprefs
from lacore.exceptions import (ApiAuthException, ApiErrorException,
    def test_unauthorized(self):
        r = [defer.succeed(json.loads(LA_ENDPOINTS_RESPONSE)),
             defer.fail(ApiAuthException())]
        s = self._mocksessions({'get.side_effect': r})
        api = self._makeit(self.prefs, session=s)