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