diff --git a/peerix/app.py b/peerix/app.py index c2cae01..9482fca 100644 --- a/peerix/app.py +++ b/peerix/app.py @@ -50,6 +50,10 @@ async def narinfo(req: Request) -> Response: if ni is None: return Response(content="Not found", status_code=404) + + print(f"=== REMOTE {req.path_params['hash']} ===") + print(ni.dump()) + print(f"=== REMOTE END ===") return Response(content=ni.dump(), status_code=200, media_type="text/x-nix-narinfo") @app.route("/local/{hash:str}.narinfo") @@ -58,6 +62,9 @@ async def access_narinfo(req: Request) -> Response: if ni is None: return Response(content="Not found", status_code=404) + print(f"=== LOCAL {req.path_params['hash']} ===") + print(ni.dump()) + print(f"=== LOCAL END ===") return Response(content=ni.dump(), status_code=200, media_type="text/x-nix-narinfo") diff --git a/peerix/store.py b/peerix/store.py index 1bb013f..f7e5d0a 100644 --- a/peerix/store.py +++ b/peerix/store.py @@ -25,9 +25,7 @@ class NarInfo(t.NamedTuple): lines.append(f"Deriver: {self.deriver} ") for sig in self.signatures: lines.append(f"Sig: {sig}") - lines.append("\n") - return "\n".join(lines) @classmethod