Skip to content
Myr

Hide a few traceback frames from the cli interface.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 3f46f4f · Browse files · 1 file+6 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−0 removed

  • other:+6 added−0 removed

1 file+6 added−0 removed

modified:flask/cli.py+6 added
76 unmodified lines
777879def locate_app(app_id):80 """Attempts to locate the application."""81 __traceback_hide__ = True82 if ':' in app_id:83 module, app_obj = app_id.split(':', 1)84 else:85 module = app_id
30 unmodified lines
116 self._load_in_background()117118 def _load_in_background(self):119 def _load_app():120 __traceback_hide__ = True121 with self._lock:122 try:123 self._load_unlocked()124 except Exception:
1 unmodified line
126 t = Thread(target=_load_app, args=())127 t.start()128129 def _flush_bg_loading_exception(self):130 __traceback_hide__ = True131 exc_info = self._bg_loading_exc_info132 if exc_info is not None:133 self._bg_loading_exc_info = None134 reraise(*exc_info)135136 def _load_unlocked(self):137 __traceback_hide__ = True138 self._app = rv = self.loader()139 self._bg_loading_exc_info = None140 return rv141142 def __call__(self, environ, start_response):143 __traceback_hide__ = True144 if self._app is not None:145 return self._app(environ, start_response)146 self._flush_bg_loading_exception()147 with self._lock:
28 unmodified lines
176 """Loads the Flask app (if not yet loaded) and returns it. Calling177 this multiple times will just result in the already loaded app to178 be returned.179 """180 __traceback_hide__ = True181 if self._loaded_app is not None:182 return self._loaded_app183 if self.create_app is not None:184 rv = self.create_app(self)
314 unmodified lines