Parcourir la source

2nd Bug-Fix: modules.brightness_choose_n_action

tags/v1.0.0
Dirk Alders il y a 1 an
Parent
révision
380fba46ab
1 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. 3
    2
      function/modules.py

+ 3
- 2
function/modules.py Voir le fichier

67
         if data is True:
67
         if data is True:
68
             self.set(self.KEY_ACTIVE_DEVICE, self.callback_device_list.index((device, key)))
68
             self.set(self.KEY_ACTIVE_DEVICE, self.callback_device_list.index((device, key)))
69
         else:
69
         else:
70
-            if self.callback_device_list[self[self.KEY_ACTIVE_DEVICE]][0] == device:
71
-                self.choose_next_device()
70
+            if self[self.KEY_ACTIVE_DEVICE] is not None:
71
+                if self.callback_device_list[self[self.KEY_ACTIVE_DEVICE]][0] == device:
72
+                    self.choose_next_device()
72
 
73
 
73
     def choose_prev_device(self, device=None, key=None, data=None):
74
     def choose_prev_device(self, device=None, key=None, data=None):
74
         if self[self.KEY_ACTIVE_DEVICE] is not None:
75
         if self[self.KEY_ACTIVE_DEVICE] is not None:

Chargement…
Annuler
Enregistrer