Exemplo n.º 1
0
    def __init__(self, user_name):
        # TODO: self.transport.http.resp_code = HTTP_401

        Fault.__init__(self,
                faultcode='Client.AuthenticationError',
                faultstring='Invalid authentication request for %r' % user_name
            )
Exemplo n.º 2
0
    def __init__(self):
        # TODO: self.transport.http.resp_code = HTTP_401

        Fault.__init__(self,
                faultcode='Client.AuthorizationError',
                faultstring='You are not authorized to access this resource.'
            )
Exemplo n.º 3
0
    def __init__(self, user_name):
        # TODO: self.transport.http.resp_code = HTTP_401

        Fault.__init__(self,
                faultcode='Client.AuthenticationError',
                faultstring='Invalid authentication request for %r' % user_name
            )
Exemplo n.º 4
0
    def __init__(self):
        # TODO: self.transport.http.resp_code = HTTP_401

        Fault.__init__(self,
                faultcode='Client.AuthorizationError',
                faultstring='You are not authorized to access this resource.'
            )
Exemplo n.º 5
0
 def __init__(self):
     Fault.__init__(self,
             faultcode="Documented",
             faultstring="A documented fault",
             faultactor='http://faultactor.example.com',
             detail=etree.Element('something')
         )
Exemplo n.º 6
0
 def __init__(self, err):
     # TODO: handle that err could be a list of strings, first element
     # should be faultstring, rest should go in self.extra.
     faultstring = err
     if isinstance(err, Exception) and err.args:
         faultstring = err.args[0]
         self.extra = err.args[1:]
     faultstring = str(faultstring)
     Fault.__init__(self, faultcode=self.faultcode, faultstring=faultstring)
Exemplo n.º 7
0
 def __init__(self, err):
     # TODO: handle that err could be a list of strings, first element
     # should be faultstring, rest should go in self.extra.
     faultstring = err
     if isinstance(err, Exception) and err.args:
         faultstring = err.args[0]
         self.extra = err.args[1:]
     faultstring = str(faultstring)
     Fault.__init__(self, faultcode=self.faultcode,
                          faultstring=faultstring)
Exemplo n.º 8
0
 def __init__(self):
     Fault.__init__(self,
             faultcode='Client.UnauthenticatedError',
             faultstring='This resource can only be accessed after authentication.'
         )
Exemplo n.º 9
0
 def __init__(self, value):
     Fault.__init__(self,
             faultcode='Client.KeyError',
             faultstring='Value %r not found' % value
         )
Exemplo n.º 10
0
 def __init__(self):
     Fault.__init__(self,
             faultcode='Client.UnauthenticatedError',
             faultstring='This resource can only be accessed after authentication.'
         )
Exemplo n.º 11
0
Arquivo: error.py Projeto: rch/rpclib
 def __init__(self, faultstring):
     Fault.__init__(self, 'Client.ValidationError',
                    'The string %r could not be validated.' % faultstring)
Exemplo n.º 12
0
 def __init__(self, faultstring):
     Fault.__init__(self, 'Client.ValidationError',
                     'The string %r could not be validated.' % faultstring)
Exemplo n.º 13
0
 def __init__(self, value):
     Fault.__init__(self,
             faultcode='Client.KeyError',
             faultstring='Value %r not found' % value
         )
Exemplo n.º 14
0
 def __init__(self, faultstring="Requested resource not found"):
     Fault.__init__(self, 'Client.ResourceNotFound', faultstring)
Exemplo n.º 15
0
 def __init__(self, faultstring=""):
     Fault.__init__(self, 'Client.RequestNotAllowed', faultstring)
Exemplo n.º 16
0
Arquivo: error.py Projeto: rch/rpclib
 def __init__(self, faultstring="Requested resource not found"):
     Fault.__init__(self, 'Client.ResourceNotFound', faultstring)
Exemplo n.º 17
0
 def __init__(self, faultstring):
     Fault.__init__(self, 'Client.RequestTooLong', faultstring)
Exemplo n.º 18
0
 def __init__(self):
     Fault.__init__(self,
                    faultcode="Documented",
                    faultstring="A documented fault",
                    faultactor='http://faultactor.example.com',
                    detail=etree.Element('something'))
Exemplo n.º 19
0
 def __init__(self, faultstring):
     Fault.__init__(self, 'Client.ArgumentError', faultstring)
Exemplo n.º 20
0
Arquivo: error.py Projeto: rch/rpclib
 def __init__(self, faultstring):
     Fault.__init__(self, 'Client.RequestTooLong', faultstring)
Exemplo n.º 21
0
 def __init__(self, faultstring):
     Fault.__init__(self, 'Client.ResourceNotFound', faultstring)
Exemplo n.º 22
0
Arquivo: error.py Projeto: rch/rpclib
 def __init__(self, faultstring):
     Fault.__init__(self, 'Client.ArgumentError', faultstring)
Exemplo n.º 23
0
Arquivo: _base.py Projeto: rch/rpclib
 def __init__(self, faultstring):
     Fault.__init__(self, "Client.SchemaValidationError", faultstring)
Exemplo n.º 24
0
Arquivo: _base.py Projeto: rch/rpclib
 def __init__(self, faultstring):
     Fault.__init__(self, 'Client.SchemaValidationError', faultstring)