diff options
author | Ian Bicking <ianb@colorstudy.com> | 2012-04-13 14:05:39 -0500 |
---|---|---|
committer | Ian Bicking <ianb@colorstudy.com> | 2012-04-13 14:05:39 -0500 |
commit | bf89ec583824d2d71b22f7898a6e09a0b9376cd4 (patch) | |
tree | 95b18d5f20a6e1e7db7e456816898534e924735c /docs/comment-example-code/example.py | |
parent | e885a1457ebf32b6227c7e05fbdb560e88a65351 (diff) | |
download | webob-bf89ec583824d2d71b22f7898a6e09a0b9376cd4.tar.gz |
Change Response.status_int to Response.status_code (while still supporting .status_int, but changing documentation to prefer status_code)
Diffstat (limited to 'docs/comment-example-code/example.py')
-rw-r--r-- | docs/comment-example-code/example.py | 7 |
1 files changed, 2 insertions, 5 deletions
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' - - - |