mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-13 10:30:16 +00:00
actions:privileged: Fix flake8 errors
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
This commit is contained in:
parent
e26a4b71eb
commit
2f53c4dd39
@ -506,9 +506,8 @@ def privileged_handle_json_request(request_string: str) -> str:
|
|||||||
if parameter not in request:
|
if parameter not in request:
|
||||||
raise TypeError(f'Missing required parameter "{parameter}"')
|
raise TypeError(f'Missing required parameter "{parameter}"')
|
||||||
if not isinstance(request[parameter], expected_type):
|
if not isinstance(request[parameter], expected_type):
|
||||||
raise TypeError(
|
raise TypeError(f'Parameter "{parameter}" must be of type'
|
||||||
f'Parameter "{parameter}" must be of type {expected_type.__name__}'
|
f'{expected_type.__name__}')
|
||||||
)
|
|
||||||
|
|
||||||
return request
|
return request
|
||||||
|
|
||||||
|
|||||||
@ -84,8 +84,8 @@ class Server(socketserver.ThreadingUnixStreamServer):
|
|||||||
or root will be denied.
|
or root will be denied.
|
||||||
|
|
||||||
If the server does not receive a request for idle_shutdown_time seconds and
|
If the server does not receive a request for idle_shutdown_time seconds and
|
||||||
no requests are being processed, then serve_forever() will raise TimeoutError
|
no requests are being processed, then serve_forever() will raise
|
||||||
(so that the program can catch it and exit).
|
TimeoutError (so that the program can catch it and exit).
|
||||||
|
|
||||||
If the daemon is spawned by systemd socket activation, then systemd
|
If the daemon is spawned by systemd socket activation, then systemd
|
||||||
provided socket is re-used (no bind() and listen() calls are made on it)
|
provided socket is re-used (no bind() and listen() calls are made on it)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user