Skip to content

Commit

Permalink
remove exception InvalidStatusCode
Browse files Browse the repository at this point in the history
  • Loading branch information
Diogo Laginha authored and laginha committed Mar 11, 2015
1 parent c422588 commit e918360
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
10 changes: 0 additions & 10 deletions src/yard/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,6 @@ def __init__(self, model):
def __str__(self):
return "No resource found for model '%s'" %self.model

class InvalidStatusCode(Exception):
'''
For when view returns an invalid status code
'''
def __init__(self, status):
self.status = status

def __str__(self):
return "Http status code '%s' is not valid. Only int allowed." %self.status


class HttpMethodNotAllowed(Exception):
'''
Expand Down
2 changes: 1 addition & 1 deletion src/yard/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.http import HttpResponse
from yard.exceptions import HttpMethodNotAllowed, InvalidStatusCode, MethodNotImplemented, RequiredParamMissing
from yard.exceptions import HttpMethodNotAllowed, MethodNotImplemented, RequiredParamMissing
from yard.utils import is_tuple, is_queryset, is_modelinstance, is_generator, is_list, is_valuesset
from yard.utils.http import to_http
from yard.forms import Form
Expand Down

0 comments on commit e918360

Please sign in to comment.