comparison sat_frontends/tools/host_listener.py @ 2624:56f94936df1e

code style reformatting using black
author Goffi <goffi@goffi.org>
date Wed, 27 Jun 2018 20:14:46 +0200
parents 26edcf3a30eb
children 003b8b4b56a7
comparison
equal deleted inserted replaced
2623:49533de4540b 2624:56f94936df1e
20 """This module is only used launch callbacks when host is ready, used for early initialisation stuffs""" 20 """This module is only used launch callbacks when host is ready, used for early initialisation stuffs"""
21 21
22 22
23 listeners = [] 23 listeners = []
24 24
25
25 def addListener(cb): 26 def addListener(cb):
26 """Add a listener which will be called when host is ready 27 """Add a listener which will be called when host is ready
27 28
28 @param cb: callback which will be called when host is ready with host as only argument 29 @param cb: callback which will be called when host is ready with host as only argument
29 """ 30 """
30 listeners.append(cb) 31 listeners.append(cb)
32
31 33
32 def callListeners(host): 34 def callListeners(host):
33 """Must be called by frontend when host is ready. 35 """Must be called by frontend when host is ready.
34 36
35 The call will launch all the callbacks, then remove the listeners list. 37 The call will launch all the callbacks, then remove the listeners list.