From 6d2dc3280b81c53eb4a6598c859eecc34bdbf2b1 Mon Sep 17 00:00:00 2001 From: Sarah Date: Mon, 18 Oct 2021 15:46:35 +0200 Subject: [PATCH] testing the wrong thing gives wrong test result. --- peerix/remote.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/peerix/remote.py b/peerix/remote.py index b64c905..3b9a246 100644 --- a/peerix/remote.py +++ b/peerix/remote.py @@ -136,7 +136,7 @@ class DiscoveryProtocol(asyncio.DatagramProtocol, Store): logging.warn(f"Remote({addr1}:{addr2})-store path is dead: {sp}") pass - _, _, hsh, _ = sp.split("/", 2) + _, _, hsh, _ = sp.split("/", 3) narinfo = await self.narinfo(hsh) if narinfo is None: logging.warn(f"All sources are gone.") @@ -145,7 +145,7 @@ class DiscoveryProtocol(asyncio.DatagramProtocol, Store): return await self._nar_req(narinfo.url) async def _nar_req(self, url: str) -> t.Awaitable[t.AsyncIterable[bytes]]: - addr1, addr2, _, p = url.split("/", 2) + addr1, addr2, _, p = url.split("/", 3) resp = await self.session.get(f"http://{addr1}:{addr2}/{p}") if resp.status == 200: return self._nar_direct(resp)