1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-31 00:39:46 +00:00

bitbake: prserv: Add read-only mode

[YOCTO #13659]

(Bitbake rev: 44287430b9804fcbf2440f85a2424792140e4dc9)

Signed-off-by: Paul Barker <pbarker@konsulko.com>
[updated for asyncrpc changes]
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Paul Barker
2021-08-19 12:46:44 -04:00
committed by Richard Purdie
parent fb3b05fe8d
commit 295b75cf1c
4 changed files with 86 additions and 32 deletions
+8 -1
View File
@@ -32,10 +32,17 @@ class PRAsyncClient(bb.asyncrpc.AsyncClient):
if response:
return (response['metainfo'], response['datainfo'])
async def is_readonly(self):
response = await self.send_message(
{'is-readonly': {}}
)
if response:
return response['readonly']
class PRClient(bb.asyncrpc.Client):
def __init__(self):
super().__init__()
self._add_methods('getPR', 'importone', 'export')
self._add_methods('getPR', 'importone', 'export', 'is_readonly')
def _get_async_client(self):
return PRAsyncClient()