summaryrefslogtreecommitdiff
path: root/docs/jsonrpc-example-code
diff options
context:
space:
mode:
authorIan Bicking <ianb@colorstudy.com>2012-04-13 14:05:39 -0500
committerIan Bicking <ianb@colorstudy.com>2012-04-13 14:05:39 -0500
commitbf89ec583824d2d71b22f7898a6e09a0b9376cd4 (patch)
tree95b18d5f20a6e1e7db7e456816898534e924735c /docs/jsonrpc-example-code
parente885a1457ebf32b6227c7e05fbdb560e88a65351 (diff)
downloadwebob-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/jsonrpc-example-code')
-rw-r--r--docs/jsonrpc-example-code/jsonrpc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/jsonrpc-example-code/jsonrpc.py b/docs/jsonrpc-example-code/jsonrpc.py
index ccd3519..c038992 100644
--- a/docs/jsonrpc-example-code/jsonrpc.py
+++ b/docs/jsonrpc-example-code/jsonrpc.py
@@ -109,8 +109,8 @@ class _Method(object):
req.content_type = 'application/json'
req.body = dumps(json)
resp = req.get_response(self.parent.proxy)
- if resp.status_int != 200 and not (
- resp.status_int == 500
+ if resp.status_code != 200 and not (
+ resp.status_code == 500
and resp.content_type == 'application/json'):
raise ProxyError(
"Error from JSON-RPC client %s: %s"