From dc3b3dcfa58634ba51b4683a5ce0b1375f0046fb Mon Sep 17 00:00:00 2001 From: blissful Date: Sun, 23 Jun 2024 00:26:08 -0400 Subject: [PATCH] stutter --- scripts/serve.py | 11 ++++++++--- src/index.jinja | 4 ++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/serve.py b/scripts/serve.py index a30b1f9..1b1bdc8 100755 --- a/scripts/serve.py +++ b/scripts/serve.py @@ -14,6 +14,11 @@ PORT = 27771 Handler = http.server.SimpleHTTPRequestHandler -with socketserver.TCPServer(("", PORT), Handler) as httpd: - print(f"Serving build on http://localhost:{PORT}") - httpd.serve_forever() +while True: + try: + with socketserver.TCPServer(("", PORT), Handler) as httpd: + print(f"Serving build on http://localhost:{PORT}") + httpd.serve_forever() + break + except OSError: + PORT += 1 diff --git a/src/index.jinja b/src/index.jinja index 6cd38be..6f956df 100644 --- a/src/index.jinja +++ b/src/index.jinja @@ -38,10 +38,10 @@
Software:
-
+