Revision 381a548c snf-django-lib/snf_django/lib/api/faults.py

b/snf-django-lib/snf_django/lib/api/faults.py
71 71
    pass
72 72

  
73 73

  
74
class NotAllowed(Fault):
75
    code = 405
76

  
77
    def __init__(self, message='', details='', name='', code=500,
78
                 allowed_methods=None):
79
        """
80
        :param allowed_methods: (list) the valid methods
81
        """
82
        super(NotAllowed, self).__init__(message, details, name, code)
83
        self.allowed_methods = allowed_methods or []
84

  
85

  
74 86
class ItemNotFound(Fault):
75 87
    code = 404
76 88

  

Also available in: Unified diff