PyJSONProxy

simple proxy and scraper
git clone https://git.ce9e.org/PyJSONProxy.git

commit
11f97180fe1bfaad3ede84e64b3caf744c9232d1
parent
410a59b0e615757f8128928591cabd048be89493
Author
Tobias Bengfort <tobias.bengfort@gmx.net>
Date
2015-12-06 23:07
small fixes

Diffstat

M jsonproxy/__init__.py 2 +-
M jsonproxy/web.py 5 ++++-

2 files changed, 5 insertions, 2 deletions


diff --git a/jsonproxy/__init__.py b/jsonproxy/__init__.py

@@ -85,7 +85,7 @@ def index(request):
   85    85 @app.route('/{endpoint}/')
   86    86 def doc(request):
   87    87 	endpoint = request.match_info['endpoint']
   88    -1 	config = app.get_config(endpoint)
   -1    88 	config = get_config(endpoint)
   89    89 	data = [_doc(config, endpoint)]
   90    90 	return render_template('index.html', endpoints=data)
   91    91 

diff --git a/jsonproxy/web.py b/jsonproxy/web.py

@@ -70,7 +70,10 @@ class Application:
   70    70 	def add_route(self, path, fn, methods=('GET',)):
   71    71 		@asyncio.coroutine
   72    72 		def wrapped(*args, **kwargs):
   73    -1 			data = yield from asyncio.async(fn(*args, **kwargs))
   -1    73 			if asyncio.iscoroutinefunction(fn):
   -1    74 				data = yield from fn(*args, **kwargs)
   -1    75 			else:
   -1    76 				data = fn(*args, **kwargs)
   74    77 			return make_response(data)
   75    78 
   76    79 		for method in methods: