diff options
Diffstat (limited to 'tools/serve.py')
| -rwxr-xr-x | tools/serve.py | 23 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 19 insertions, 4 deletions
diff --git a/tools/serve.py b/tools/serve.py index 2b2f045..a39d03f 100755 --- a/tools/serve.py +++ b/tools/serve.py @@ -29,8 +29,20 @@ REPO_ROOT = Path(__file__).resolve().parent.parent MAX_BODY_BYTES = 8 * 1024 * 1024 CGI_TIMEOUT = 60 -STATIC_SUFFIXES = (".css", ".js", ".png", ".ico", ".gif", ".jpg", ".jpeg", - ".svg", ".webp", ".txt", ".woff", ".woff2") +STATIC_SUFFIXES = ( + ".css", + ".js", + ".png", + ".ico", + ".gif", + ".jpg", + ".jpeg", + ".svg", + ".webp", + ".txt", + ".woff", + ".woff2", +) # The request headers cgit looks at, paired with the CGI variable each one # has to arrive as. @@ -273,8 +285,11 @@ def main() -> None: config = Path(options.config).resolve() cgit = Path(options.cgit).resolve() data_dir = Path(options.data).resolve() - for label, path in (("config", config), ("cgit binary", cgit), - ("data directory", data_dir)): + for label, path in ( + ("config", config), + ("cgit binary", cgit), + ("data directory", data_dir), + ): if not path.exists(): sys.exit(f"error: {label} not found: {path}") |
