diff options
Diffstat (limited to 'poky/bitbake/lib/hashserv/client.py')
-rw-r--r-- | poky/bitbake/lib/hashserv/client.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/poky/bitbake/lib/hashserv/client.py b/poky/bitbake/lib/hashserv/client.py index ae5875d1b..0ffd0c2ae 100644 --- a/poky/bitbake/lib/hashserv/client.py +++ b/poky/bitbake/lib/hashserv/client.py @@ -40,7 +40,7 @@ class AsyncClient(object): self._connect_sock = connect_sock - async def _connect(self): + async def connect(self): if self.reader is None or self.writer is None: (self.reader, self.writer) = await self._connect_sock() @@ -62,7 +62,7 @@ class AsyncClient(object): count = 0 while True: try: - await self._connect() + await self.connect() return await proc() except ( OSError, @@ -190,7 +190,6 @@ class Client(object): for call in ( "connect_tcp", - "connect_unix", "close", "get_unihash", "report_unihash", @@ -209,6 +208,16 @@ class Client(object): return wrapper + def connect_unix(self, path): + # AF_UNIX has path length issues so chdir here to workaround + cwd = os.getcwd() + try: + os.chdir(os.path.dirname(path)) + self.loop.run_until_complete(self.client.connect_unix(os.path.basename(path))) + self.loop.run_until_complete(self.client.connect()) + finally: + os.chdir(cwd) + @property def max_chunk(self): return self.client.max_chunk |