def start(self): if not self.event_detect_added: GPIO.add_event_detect(self.channel, self.polarity, callback=self.debounce) self.event_detect_added = True