From: Lucian Ursu Date: Tue, 10 Jan 2012 10:17:57 +0000 (+0200) Subject: Fixed code in 'Event Hooks' section X-Git-Tag: v0.9.2~11^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=de17f4e5a49ee980c45006fa14e17b33cfbe525f;p=services%2Fpython-requests.git Fixed code in 'Event Hooks' section --- diff --git a/docs/user/advanced.rst b/docs/user/advanced.rst index d1c2cd0..1ffd778 100644 --- a/docs/user/advanced.rst +++ b/docs/user/advanced.rst @@ -194,7 +194,7 @@ Let's print some request method arguments at runtime:: Let's hijack some arguments this time with a new callback:: def hack_headers(args): - if not args[headers]: + if args.get('headers') is None: args['headers'] = dict() args['headers'].update({'X-Testing': 'True'})