Avoid infinite loop if server crashes

This commit is contained in:
Théo Piboubès
2015-09-04 18:18:31 +02:00
parent f6546aaf75
commit 6933b35240

View File

@@ -28,6 +28,7 @@ class HomeHandler(web.RequestHandler):
class AuthHandler(web.RequestHandler):
def get(self):
try:
global oauth_state
global oauth_code
global oauth_error
@@ -37,7 +38,7 @@ class AuthHandler(web.RequestHandler):
oauth_error = self.get_argument('error', default='error_placeholder')
self.render('auth.html', state=oauth_state, code=oauth_code, error=oauth_error)
finally:
ioloop.IOLoop.current().stop()
class OAuthTool(object):