PEP-8: Update max line len to 79
This commit is contained in:
parent
06d1274562
commit
3350e54835
|
@ -225,8 +225,8 @@ class Request:
|
||||||
|
|
||||||
if not self.tor_valid:
|
if not self.tor_valid:
|
||||||
raise TorError(
|
raise TorError(
|
||||||
"Tor connection succeeded, but the connection could not be "
|
"Tor connection succeeded, but the connection could not "
|
||||||
"validated by torproject.org",
|
"be validated by torproject.org",
|
||||||
disable=True)
|
disable=True)
|
||||||
|
|
||||||
response = requests.get(
|
response = requests.get(
|
||||||
|
|
|
@ -45,7 +45,9 @@ def auth_required(f):
|
||||||
|
|
||||||
@app.before_request
|
@app.before_request
|
||||||
def before_request_func():
|
def before_request_func():
|
||||||
g.request_params = request.args if request.method == 'GET' else request.form
|
g.request_params = (
|
||||||
|
request.args if request.method == 'GET' else request.form
|
||||||
|
)
|
||||||
g.cookies_disabled = False
|
g.cookies_disabled = False
|
||||||
|
|
||||||
# Generate session values for user if unavailable
|
# Generate session values for user if unavailable
|
||||||
|
@ -69,7 +71,9 @@ def before_request_func():
|
||||||
is_http = request.url.startswith('http://')
|
is_http = request.url.startswith('http://')
|
||||||
|
|
||||||
if (is_heroku and is_http) or (https_only and is_http):
|
if (is_heroku and is_http) or (https_only and is_http):
|
||||||
return redirect(request.url.replace('http://', 'https://', 1), code=308)
|
return redirect(
|
||||||
|
request.url.replace('http://', 'https://', 1),
|
||||||
|
code=308)
|
||||||
|
|
||||||
g.user_config = Config(**session['config'])
|
g.user_config = Config(**session['config'])
|
||||||
|
|
||||||
|
@ -324,7 +328,7 @@ def window():
|
||||||
get_body = get_body.replace('href="/',
|
get_body = get_body.replace('href="/',
|
||||||
'href="' + request.args.get('location') + '"')
|
'href="' + request.args.get('location') + '"')
|
||||||
|
|
||||||
results = BeautifulSoup(get_body, 'html.parser')
|
results = bsoup(get_body, 'html.parser')
|
||||||
|
|
||||||
for script in results('script'):
|
for script in results('script'):
|
||||||
script.decompose()
|
script.decompose()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user