Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Unified Diff: swarm_client/third_party/requests/hooks.py

Issue 69143004: Delete swarm_client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « swarm_client/third_party/requests/exceptions.py ('k') | swarm_client/third_party/requests/models.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: swarm_client/third_party/requests/hooks.py
===================================================================
--- swarm_client/third_party/requests/hooks.py (revision 235167)
+++ swarm_client/third_party/requests/hooks.py (working copy)
@@ -1,45 +0,0 @@
-# -*- coding: utf-8 -*-
-
-"""
-requests.hooks
-~~~~~~~~~~~~~~
-
-This module provides the capabilities for the Requests hooks system.
-
-Available hooks:
-
-``response``:
- The response generated from a Request.
-
-"""
-
-
-HOOKS = ['response']
-
-
-def default_hooks():
- hooks = {}
- for event in HOOKS:
- hooks[event] = []
- return hooks
-
-# TODO: response is the only one
-
-
-def dispatch_hook(key, hooks, hook_data, **kwargs):
- """Dispatches a hook dictionary on a given piece of data."""
-
- hooks = hooks or dict()
-
- if key in hooks:
- hooks = hooks.get(key)
-
- if hasattr(hooks, '__call__'):
- hooks = [hooks]
-
- for hook in hooks:
- _hook_data = hook(hook_data, **kwargs)
- if _hook_data is not None:
- hook_data = _hook_data
-
- return hook_data
« no previous file with comments | « swarm_client/third_party/requests/exceptions.py ('k') | swarm_client/third_party/requests/models.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698