mgmt: allow functions to return None if no data is to be returned
Don't force `return ''` everywhere. QubesOS/qubes-issues#2622
This commit is contained in:
parent
6924ec3b85
commit
2c115bb648
@ -117,7 +117,8 @@ class QubesDaemonProtocol(asyncio.Protocol):
|
||||
|
||||
def send_response(self, content):
|
||||
self.send_header(0x30)
|
||||
self.transport.write(content.encode('utf-8'))
|
||||
if content is not None:
|
||||
self.transport.write(content.encode('utf-8'))
|
||||
|
||||
def send_event(self, subject, event, **kwargs):
|
||||
self.send_header(0x31)
|
||||
|
Loading…
Reference in New Issue
Block a user