Merge branch 'develop'

This commit is contained in:
Ruud committed 2014-12-20 19:10:04 +01:00
commit 8770ab6696
1 file changed
+1 -2
+1 -2
View File
@@ -7,7 +7,6 @@ import urllib
from couchpotato.core.helpers.request import getParams from couchpotato.core.helpers.request import getParams
from couchpotato.core.logger import CPLog from couchpotato.core.logger import CPLog
from tornado.ioloop import IOLoop
from tornado.web import RequestHandler, asynchronous from tornado.web import RequestHandler, asynchronous
@@ -34,7 +33,7 @@ def run_async(func):
def run_handler(route, kwargs, callback = None): def run_handler(route, kwargs, callback = None):
try: try:
res = api[route](**kwargs) res = api[route](**kwargs)
IOLoop.current().add_callback(callback, res, route) callback(res, route)
except: except:
log.error('Failed doing api request "%s": %s', (route, traceback.format_exc())) log.error('Failed doing api request "%s": %s', (route, traceback.format_exc()))
callback({'success': False, 'error': 'Failed returning results'}, route) callback({'success': False, 'error': 'Failed returning results'}, route)