api/admin: don't send internal events in admin.Events
Some events are internal for a sole purpose of getting some data from extension. Since listeners of admin.Events cannot return anything, there is no sense in sending those events there.
This commit is contained in:
parent
b25cf4b085
commit
354aa14c53
@ -43,8 +43,18 @@ class QubesMgmtEventsDispatcher(object):
|
||||
self.send_event = send_event
|
||||
|
||||
def vm_handler(self, subject, event, **kwargs):
|
||||
# do not send internal events
|
||||
if event.startswith('admin-permission:'):
|
||||
return
|
||||
if event.startswith('device-get:'):
|
||||
return
|
||||
if event.startswith('device-list:'):
|
||||
return
|
||||
if event.startswith('device-list-attached:'):
|
||||
return
|
||||
if event in ('domain-is-fully-usable',):
|
||||
return
|
||||
|
||||
if not list(qubes.api.apply_filters([(subject, event, kwargs)],
|
||||
self.filters)):
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user