Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, *args, **kwargs):
self.ws_class = kwargs.pop('ws_class', WebOSWebSocketClient)
super(InputControl, self).__init__(*args, **kwargs)
def get_control(self, controltype):
if controltype not in self.clients:
if controltype == 'media':
control = MediaControl(self.client)
elif controltype == 'input':
control = InputControl(self.client)
control.connect_input()
elif controltype == 'system':
control = SystemControl(self.client)
elif controltype == 'source':
control = SourceControl(self.client)
self.clients[controltype] = control
return self.clients[controltype]