def cmd_set_effect(self, *args):
    try:
        [effect, speed] = args[0]
        effect = Effect[effect]
        speed = int(speed)
    except KeyError as key:
        logger.error('Unknown effect {}'.format(key))
    except ValueError:
        self.print_usage('set_effect')
    else:
        self._magic_blue.set_effect(effect, speed)
def cmd_set_effect(self, *args):
    try:
        [effect, speed] = args[0]
        effect = Effect[effect]
        speed = int(speed)
    except KeyError as key:
        logger.error('Unknown effect {}'.format(key))
    except ValueError:
        self.print_usage('set_effect')
    else:
        self._magic_blue.set_effect(effect, speed)