Changed message to msg in HttpStatusCode to avoid 2.6 DeprecationWarnings.
This commit is contained in:
Родитель
b080992c05
Коммит
f81b2812fe
|
@ -169,7 +169,7 @@ class Resource(object):
|
|||
|
||||
return resp
|
||||
except HttpStatusCode, e:
|
||||
return HttpResponse(e.message, status=e.code)
|
||||
return HttpResponse(e.msg, status=e.code)
|
||||
|
||||
@staticmethod
|
||||
def cleanup_request(request):
|
||||
|
|
|
@ -50,8 +50,8 @@ class FormValidationError(Exception):
|
|||
self.form = form
|
||||
|
||||
class HttpStatusCode(Exception):
|
||||
def __init__(self, message, code=200):
|
||||
self.message = message
|
||||
def __init__(self, msg, code=200):
|
||||
self.msg = msg
|
||||
self.code = code
|
||||
|
||||
def validate(v_form, operation='POST'):
|
||||
|
|
Загрузка…
Ссылка в новой задаче