From de17f4e5a49ee980c45006fa14e17b33cfbe525f Mon Sep 17 00:00:00 2001 From: Lucian Ursu Date: Tue, 10 Jan 2012 12:17:57 +0200 Subject: [PATCH] Fixed code in 'Event Hooks' section --- docs/user/advanced.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user/advanced.rst b/docs/user/advanced.rst index d1c2cd0c..1ffd778d 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'})