Skip to content

Commit 6e11818

Browse files
committed
chore(lint): format imports and add/remove blank lines.
1 parent 1a1dfda commit 6e11818

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

roundup/cgi/client.py

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,34 @@ class SysCallError(Exception):
2626

2727
import roundup.anypy.email_ # noqa: F401 -- patches for email library code
2828
from roundup import hyperdb, rest, xmlrpc
29+
2930
# quality of random checked below
3031
from roundup.anypy import http_, random_, urllib_, xmlrpc_
3132
from roundup.anypy.cgi_ import cgi
3233
from roundup.anypy.cookie_ import BaseCookie, CookieError, SimpleCookie, get_cookie_date
3334
from roundup.anypy.html import html_escape
3435
from roundup.anypy.strings import b2s, bs2b, is_us, s2b, uchr
3536
from roundup.cgi import TranslationService, accept_language, actions, cgitb, templating
36-
from roundup.cgi.exceptions import DetectorError, FormError, \
37-
IndexerQueryError, NotFound, NotModified, Redirect, SendFile, \
38-
SendStaticFile, SeriousError
39-
37+
from roundup.cgi.exceptions import (
38+
DetectorError,
39+
FormError,
40+
IndexerQueryError,
41+
NotFound,
42+
NotModified,
43+
Redirect,
44+
SendFile,
45+
SendStaticFile,
46+
SeriousError,
47+
)
4048
from roundup.cgi.form_parser import FormParser
41-
from roundup.exceptions import LoginError, RateLimitExceeded, Reject, \
42-
RejectRaw, Unauthorised, UsageError
49+
from roundup.exceptions import (
50+
LoginError,
51+
RateLimitExceeded,
52+
Reject,
53+
RejectRaw,
54+
Unauthorised,
55+
UsageError,
56+
)
4357
from roundup.mailer import Mailer, MessageSendError
4458

4559
logger = logging.getLogger('roundup')
@@ -49,6 +63,7 @@ class SysCallError(Exception):
4963
else:
5064
logger.warning("**SystemRandom not available. Using poor random generator")
5165

66+
5267
def initialiseSecurity(security):
5368
'''Create some Permissions and Roles on the security object
5469
@@ -1130,7 +1145,6 @@ def authenticate_bearer_token(self, challenge):
11301145
self.setHeader("WWW-Authenticate", "Basic")
11311146
raise LoginError('Support for jwt disabled.')
11321147

1133-
11341148
# If first ',' separated token is < 32, jwt is disabled.
11351149
# If second or later tokens are < 32 chars, the config system
11361150
# stops the tracker from starting so insecure tokens can not
@@ -1166,7 +1180,6 @@ def authenticate_bearer_token(self, challenge):
11661180
self.make_user_anonymous()
11671181
raise LoginError(last_error)
11681182

1169-
11701183
def determine_user(self, is_api=False):
11711184
"""Determine who the user is"""
11721185
self.opendb('admin')

0 commit comments

Comments
 (0)