diff options
Diffstat (limited to 'bitbake/lib/prserv/client.py')
-rw-r--r-- | bitbake/lib/prserv/client.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bitbake/lib/prserv/client.py b/bitbake/lib/prserv/client.py index 285dce72f6..a3f19ddafc 100644 --- a/bitbake/lib/prserv/client.py +++ b/bitbake/lib/prserv/client.py | |||
@@ -32,10 +32,17 @@ class PRAsyncClient(bb.asyncrpc.AsyncClient): | |||
32 | if response: | 32 | if response: |
33 | return (response['metainfo'], response['datainfo']) | 33 | return (response['metainfo'], response['datainfo']) |
34 | 34 | ||
35 | async def is_readonly(self): | ||
36 | response = await self.send_message( | ||
37 | {'is-readonly': {}} | ||
38 | ) | ||
39 | if response: | ||
40 | return response['readonly'] | ||
41 | |||
35 | class PRClient(bb.asyncrpc.Client): | 42 | class PRClient(bb.asyncrpc.Client): |
36 | def __init__(self): | 43 | def __init__(self): |
37 | super().__init__() | 44 | super().__init__() |
38 | self._add_methods('getPR', 'importone', 'export') | 45 | self._add_methods('getPR', 'importone', 'export', 'is_readonly') |
39 | 46 | ||
40 | def _get_async_client(self): | 47 | def _get_async_client(self): |
41 | return PRAsyncClient() | 48 | return PRAsyncClient() |