Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def setEnabled(self, on):
oldon = self.on
ToastMachine.setEnabled(self, on)
if oldon != self.on:
self.parent.config.set('notify', self.on)
if self.on:
self.timer.start()
else:
self.timer.stop()