mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-04 08:13:38 +00:00
ci: Fix flake8 errors
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
This commit is contained in:
parent
d4cdedf1c3
commit
e5b149baa3
@ -68,11 +68,14 @@ def create_ticket(pkey, uid, validuntil, ip=None, tokens=None, udata=None,
|
||||
graceperiod=None, extra_fields=None):
|
||||
"""Create and return a signed mod_auth_pubtkt ticket."""
|
||||
fields = [
|
||||
'uid={}'.format(uid), 'validuntil={}'.format(validuntil, type='d'), ip
|
||||
and 'cip={}'.format(ip), tokens and 'tokens={}'.format(tokens),
|
||||
graceperiod and 'graceperiod={}'.format(graceperiod, type='d'), udata
|
||||
and 'udata={}'.format(udata), extra_fields
|
||||
and ';'.join(['{}={}'.format(k, v) for k, v in extra_fields])
|
||||
f'uid={uid}',
|
||||
'validuntil={0:d}'.format(validuntil),
|
||||
ip and f'cip={ip}',
|
||||
tokens and f'tokens={tokens}',
|
||||
graceperiod and 'graceperiod={0:d}'.format(graceperiod),
|
||||
udata and f'udata={udata}',
|
||||
extra_fields and ';'.join(
|
||||
['{}={}'.format(k, v) for k, v in extra_fields])
|
||||
]
|
||||
data = ';'.join(filter(None, fields))
|
||||
signature = 'sig={}'.format(sign(pkey, data))
|
||||
|
||||
@ -14,8 +14,8 @@ from plinth.modules.apache.components import Uwsgi, Webserver
|
||||
from plinth.modules.firewall.components import Firewall
|
||||
from plinth.modules.users.components import UsersAndGroups
|
||||
|
||||
from .manifest import (PUBLIC_ACCESS_SETTING_FILE, # noqa, pylint: disable=unused-import
|
||||
backup, clients)
|
||||
from .manifest import backup # noqa, pylint: disable=unused-import
|
||||
from .manifest import (PUBLIC_ACCESS_SETTING_FILE, clients)
|
||||
|
||||
version = 4
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user