mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +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):
|
graceperiod=None, extra_fields=None):
|
||||||
"""Create and return a signed mod_auth_pubtkt ticket."""
|
"""Create and return a signed mod_auth_pubtkt ticket."""
|
||||||
fields = [
|
fields = [
|
||||||
'uid={}'.format(uid), 'validuntil={}'.format(validuntil, type='d'), ip
|
f'uid={uid}',
|
||||||
and 'cip={}'.format(ip), tokens and 'tokens={}'.format(tokens),
|
'validuntil={0:d}'.format(validuntil),
|
||||||
graceperiod and 'graceperiod={}'.format(graceperiod, type='d'), udata
|
ip and f'cip={ip}',
|
||||||
and 'udata={}'.format(udata), extra_fields
|
tokens and f'tokens={tokens}',
|
||||||
and ';'.join(['{}={}'.format(k, v) for k, v in extra_fields])
|
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))
|
data = ';'.join(filter(None, fields))
|
||||||
signature = 'sig={}'.format(sign(pkey, data))
|
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.firewall.components import Firewall
|
||||||
from plinth.modules.users.components import UsersAndGroups
|
from plinth.modules.users.components import UsersAndGroups
|
||||||
|
|
||||||
from .manifest import (PUBLIC_ACCESS_SETTING_FILE, # noqa, pylint: disable=unused-import
|
from .manifest import backup # noqa, pylint: disable=unused-import
|
||||||
backup, clients)
|
from .manifest import (PUBLIC_ACCESS_SETTING_FILE, clients)
|
||||||
|
|
||||||
version = 4
|
version = 4
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user