def __setitem__(self, key, value):
        if not (int(key) > 0 and int(key) <= self._count):
            raise Exception('Invalid channel index %s' % key)
        if not value:
            try:
                dict.__delitem__(self, str(key))
            except:
                pass
        else:
            dict.__setitem__(self, str(key), value)
        self._send()
dataset/ETHPy150Open dronekit/dronekit-python/dronekit/__init__.py/ChannelsOverride.__setitem__/original