some debugging.

This commit is contained in:
Sarah 2021-10-17 04:04:02 +02:00
parent 0c488745cb
commit d364725d30
No known key found for this signature in database
GPG key ID: 708F7ACE058F0186
2 changed files with 7 additions and 2 deletions

View file

@ -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")

View file

@ -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