@@ -17,19 +17,20 @@ class FlaskSentry(object):
1717 def __init__ (self , app = None ):
1818 self .app = app
1919 if app is not None :
20- self .init_app (app , ** options )
20+ self .init_app (app )
2121
22- def init_app (self , app , setup_logger = True ):
22+ def init_app (self , app ):
2323 if not hasattr (app , "extensions" ):
2424 app .extensions = {}
2525 elif app .extensions .get (__name__ , None ):
2626 raise RuntimeError ("Sentry extension is already registered" )
2727 app .extensions [__name__ ] = True
2828
29- client_options , integration_options = \
30- FlaskIntegration .parse_environment (app .config )
29+ client_options , integration_options = FlaskIntegration .parse_environment (
30+ app .config
31+ )
3132 integration = FlaskIntegration (app , ** integration_options )
32- client_options .setdefault (' integrations' , []).append (integration )
33+ client_options .setdefault (" integrations" , []).append (integration )
3334 init (** client_options )
3435
3536
@@ -43,12 +44,12 @@ def __init__(self, app, setup_logger=True):
4344 def install (self , client = None ):
4445 appcontext_pushed .connect (self ._push_appctx , sender = self ._app )
4546 self ._app .teardown_appcontext (self ._pop_appctx )
46- got_request_exception .connect (self ._capture_exception ,
47- sender = self ._app )
47+ got_request_exception .connect (self ._capture_exception , sender = self ._app )
4848 self ._app .before_request (self ._before_request )
4949
5050 if self ._setup_logger :
5151 from .logging import HANDLER
52+
5253 self ._app .logger .addHandler (HANDLER )
5354
5455 def _push_appctx (self , * args , ** kwargs ):
0 commit comments