mirror of
				https://github.com/avatao-content/baseimage-tutorial-framework
				synced 2025-11-04 05:22:55 +00:00 
			
		
		
		
	Refactor callback subscription stuff to a mixin
This commit is contained in:
		@@ -11,7 +11,7 @@ log = logging.getLogger(__name__)
 | 
			
		||||
if __name__ == '__main__':
 | 
			
		||||
    ide = SourceCodeEventHandler('webide', tfwenv.WEBIDE_WD)
 | 
			
		||||
    terminado = TerminadoEventHandler('shell')
 | 
			
		||||
    terminado.historymonitor.callbacks.append(lambda hist: log.debug('User executed command: "{}"'.format(hist[-1])))
 | 
			
		||||
    terminado.historymonitor.subscribe_callback(lambda hist: log.debug('User executed command: "{}"'.format(hist[-1])))
 | 
			
		||||
    processmanager = ProcessManagingEventHandler('processmanager', ide.monitor)
 | 
			
		||||
 | 
			
		||||
    eventhandlers = {ide, terminado, processmanager}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user