force safe mode for async
authorKenneth Reitz <me@kennethreitz.com>
Sat, 24 Dec 2011 08:06:13 +0000 (03:06 -0500)
committerKenneth Reitz <me@kennethreitz.com>
Sat, 24 Dec 2011 08:06:13 +0000 (03:06 -0500)
requests/async.py

index c91025f..6f8de38 100644 (file)
@@ -36,6 +36,11 @@ def patched(f):
         kwargs['return_response'] = False
         kwargs['prefetch'] = True
 
+        config = kwargs.get('config', {})
+        config.update(safe_mode=True)
+
+        kwargs['config'] = config
+
         return f(*args, **kwargs)
 
     return wrapped