From bf89ec583824d2d71b22f7898a6e09a0b9376cd4 Mon Sep 17 00:00:00 2001 From: Ian Bicking Date: Fri, 13 Apr 2012 14:05:39 -0500 Subject: Change Response.status_int to Response.status_code (while still supporting .status_int, but changing documentation to prefer status_code) --- docs/comment-example-code/example.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'docs/comment-example-code') diff --git a/docs/comment-example-code/example.py b/docs/comment-example-code/example.py index 781acd3..5b50759 100644 --- a/docs/comment-example-code/example.py +++ b/docs/comment-example-code/example.py @@ -5,7 +5,7 @@ import re from cPickle import load, dump from webob import Request, Response, html_escape from webob import exc - + class Commenter(object): def __init__(self, app, storage_dir): @@ -21,7 +21,7 @@ class Commenter(object): # This is the base path of *this* middleware: base_url = req.application_url resp = req.get_response(self.app) - if resp.content_type != 'text/html' or resp.status_int != 200: + if resp.content_type != 'text/html' or resp.status_code != 200: # Not an HTML response, we don't want to # do anything to it return resp(environ, start_response) @@ -145,6 +145,3 @@ if __name__ == '__main__': httpd.serve_forever() except KeyboardInterrupt: print '^C' - - - -- cgit v1.2.1