示例#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
            )
示例#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.'
            )
示例#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
            )
示例#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.'
            )
示例#5
0
文件: _service.py 项目: azurit/rpclib
 def __init__(self):
     Fault.__init__(self,
             faultcode="Documented",
             faultstring="A documented fault",
             faultactor='http://faultactor.example.com',
             detail=etree.Element('something')
         )
示例#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)
示例#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)
示例#8
0
 def __init__(self):
     Fault.__init__(self,
             faultcode='Client.UnauthenticatedError',
             faultstring='This resource can only be accessed after authentication.'
         )
示例#9
0
 def __init__(self, value):
     Fault.__init__(self,
             faultcode='Client.KeyError',
             faultstring='Value %r not found' % value
         )
示例#10
0
 def __init__(self):
     Fault.__init__(self,
             faultcode='Client.UnauthenticatedError',
             faultstring='This resource can only be accessed after authentication.'
         )
示例#11
0
文件: error.py 项目: rch/rpclib
 def __init__(self, faultstring):
     Fault.__init__(self, 'Client.ValidationError',
                    'The string %r could not be validated.' % faultstring)
示例#12
0
 def __init__(self, faultstring):
     Fault.__init__(self, 'Client.ValidationError',
                     'The string %r could not be validated.' % faultstring)
示例#13
0
 def __init__(self, value):
     Fault.__init__(self,
             faultcode='Client.KeyError',
             faultstring='Value %r not found' % value
         )
示例#14
0
文件: error.py 项目: azurit/rpclib
 def __init__(self, faultstring="Requested resource not found"):
     Fault.__init__(self, 'Client.ResourceNotFound', faultstring)
示例#15
0
文件: error.py 项目: azurit/rpclib
 def __init__(self, faultstring=""):
     Fault.__init__(self, 'Client.RequestNotAllowed', faultstring)
示例#16
0
文件: error.py 项目: rch/rpclib
 def __init__(self, faultstring="Requested resource not found"):
     Fault.__init__(self, 'Client.ResourceNotFound', faultstring)
示例#17
0
 def __init__(self, faultstring):
     Fault.__init__(self, 'Client.RequestTooLong', faultstring)
示例#18
0
 def __init__(self):
     Fault.__init__(self,
                    faultcode="Documented",
                    faultstring="A documented fault",
                    faultactor='http://faultactor.example.com',
                    detail=etree.Element('something'))
示例#19
0
 def __init__(self, faultstring):
     Fault.__init__(self, 'Client.ArgumentError', faultstring)
示例#20
0
文件: error.py 项目: rch/rpclib
 def __init__(self, faultstring):
     Fault.__init__(self, 'Client.RequestTooLong', faultstring)
示例#21
0
 def __init__(self, faultstring):
     Fault.__init__(self, 'Client.ResourceNotFound', faultstring)
示例#22
0
文件: error.py 项目: rch/rpclib
 def __init__(self, faultstring):
     Fault.__init__(self, 'Client.ArgumentError', faultstring)
示例#23
0
文件: _base.py 项目: rch/rpclib
 def __init__(self, faultstring):
     Fault.__init__(self, "Client.SchemaValidationError", faultstring)
示例#24
0
文件: _base.py 项目: rch/rpclib
 def __init__(self, faultstring):
     Fault.__init__(self, 'Client.SchemaValidationError', faultstring)