mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-28 15:27:11 -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 distutils.version import LooseVersion as Version
|
||||||
from urllib.request import urlopen
|
from urllib.request import urlopen
|
||||||
|
|
||||||
|
import flask
|
||||||
from flask import (
|
from flask import (
|
||||||
Flask, Response, Request, request, render_template, abort, make_response,
|
Flask, Response, Request, request, render_template, abort, make_response,
|
||||||
flash, redirect, __version__ as flask_version
|
flash, redirect, __version__ as flask_version
|
||||||
@ -40,6 +41,15 @@ from werkzeug.utils import secure_filename
|
|||||||
|
|
||||||
from . import strings, common
|
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):
|
class Web(object):
|
||||||
"""
|
"""
|
||||||
The Web object is the OnionShare web server, powered by flask
|
The Web object is the OnionShare web server, powered by flask
|
||||||
|
Loading…
x
Reference in New Issue
Block a user