fixed scan not seeing the devices

This commit is contained in:
Daniel Pavel 2012-12-01 22:34:52 +02:00
parent 130a23dd4f
commit 2a44b0bb5b
4 changed files with 7 additions and 4 deletions

View File

@ -5,4 +5,4 @@ LIB=`readlink -f $(dirname "$Z")/../lib`
export PYTHONPATH=$LIB
PYTHON=${PYTHON:-`which python python2 python3 | head -n 1`}
exec $PYTHON -u -m hidapi.hidconsole "$@"
exec $PYTHON -m hidapi.hidconsole "$@"

View File

@ -5,4 +5,4 @@ LIB=`readlink -f $(dirname "$Z")/../lib`
export PYTHONPATH=$LIB
PYTHON=${PYTHON:-`which python python2 python3 | head -n 1`}
exec $PYTHON -u -m logitech.scanner "$@"
exec $PYTHON -m logitech.scanner "$@"

View File

@ -9,4 +9,4 @@ export PYTHONPATH=$APP:$LIB
export XDG_DATA_DIRS=${SHARE}_override:$SHARE:$XDG_DATA_DIRS
PYTHON=${PYTHON:-`which python python2 python3 | head -n 1`}
exec $PYTHON -u -m solaar "$@"
exec $PYTHON -m solaar "$@"

View File

@ -242,7 +242,10 @@ class Receiver(object):
def __iter__(self):
for number in range(1, 1 + MAX_PAIRED_DEVICES):
dev = self._devices.get(number)
if number in self._devices:
dev = self._devices[number]
else:
dev = self.__getitem__(number)
if dev is not None:
yield dev