From 16271189eae777aad5f1c76f9605657ea33dac78 Mon Sep 17 00:00:00 2001 From: George Hotz Date: Sat, 12 Oct 2024 18:20:19 +0800 Subject: [PATCH] hotfix: don't spend lines on a (broken) favicon --- tinygrad/viz/favicon.svg | 25 ------------------------- tinygrad/viz/index.html | 2 +- tinygrad/viz/serve.py | 8 +------- 3 files changed, 2 insertions(+), 33 deletions(-) delete mode 100644 tinygrad/viz/favicon.svg diff --git a/tinygrad/viz/favicon.svg b/tinygrad/viz/favicon.svg deleted file mode 100644 index 420a33e0..00000000 --- a/tinygrad/viz/favicon.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - diff --git a/tinygrad/viz/index.html b/tinygrad/viz/index.html index 86a6414c..657e3bc1 100644 --- a/tinygrad/viz/index.html +++ b/tinygrad/viz/index.html @@ -3,7 +3,7 @@ tinygrad viz - + diff --git a/tinygrad/viz/serve.py b/tinygrad/viz/serve.py index e74c57a1..4ee84f4f 100755 --- a/tinygrad/viz/serve.py +++ b/tinygrad/viz/serve.py @@ -89,13 +89,7 @@ def get_details(k:Any, ctx:TrackedRewriteContext, metadata:GraphRewriteMetadata) class Handler(BaseHTTPRequestHandler): def do_GET(self): - if (url:=urlparse(self.path)).path == "/favicon.svg": - self.send_response(200) - self.send_header("Content-type", "image/svg+xml") - self.end_headers() - with open(os.path.join(os.path.dirname(__file__), "favicon.svg"), "rb") as f: - ret = f.read() - if url.path == "/": + if (url:=urlparse(self.path)).path == "/": self.send_response(200) self.send_header("Content-type", "text/html") self.end_headers()