mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-27 16:29:41 -05:00
Monkeypatch flask to suppress output that isn't applicable to OnionShare
This commit is contained in:
parent
6269f16034
commit
f90e96e21a
@ -32,6 +32,7 @@ import io
|
||||
from distutils.version import LooseVersion as Version
|
||||
from urllib.request import urlopen
|
||||
|
||||
import flask
|
||||
from flask import (
|
||||
Flask, Response, Request, request, render_template, abort, make_response,
|
||||
flash, redirect, __version__ as flask_version
|
||||
@ -40,6 +41,15 @@ from werkzeug.utils import secure_filename
|
||||
|
||||
from . import strings, common
|
||||
|
||||
|
||||
# Stub out flask's show_server_banner function, to avoiding showing warnings that
|
||||
# are not applicable to OnionShare
|
||||
def stubbed_show_server_banner(env, debug, app_import_path, eager_loading):
|
||||
pass
|
||||
|
||||
flask.cli.show_server_banner = stubbed_show_server_banner
|
||||
|
||||
|
||||
class Web(object):
|
||||
"""
|
||||
The Web object is the OnionShare web server, powered by flask
|
||||
|
Loading…
Reference in New Issue
Block a user