Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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]