Changeset 613
- Timestamp:
- 09/05/05 13:10:30
- Files:
-
- trunk/cherrypy/_cperror.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cperror.py
r608 r613 176 176 """Exception raised when the client has made an error in its request.""" 177 177 178 def __init__(self, status=400, message= None):178 def __init__(self, status=400, message=_missing): 179 179 self.status = status = int(status) 180 if status < 400 or status > 499:181 raise ValueError("status must be between 400 and 499.")182 183 # these 2lines might dissapear180 if status < 400 or status > 599: 181 raise ValueError("status must be between 400 and 599.") 182 183 # these 4 lines might dissapear 184 184 import cherrypy 185 185 cherrypy.response.status = status 186 186 if message is not _missing: 187 cherrypy.response.body=message 188 187 189 self.message = message 188 190

