You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
512 B

  1. from ctabus.internal.config import state_dir
  2. from ctabus.internal.notification import NotificationManager, HAS_NOTIFICATION
  3. class CTABUSNotifictaionManager(NotificationManager):
  4. def __init__(self, workdir=state_dir):
  5. super().__init__(workdir, group="ctabus")
  6. self.exiter = None
  7. def setup_exiter(self, exiter):
  8. if self.exiter is None:
  9. self.exiter = exiter
  10. def on_done(self):
  11. self.exiter.set()
  12. if HAS_NOTIFICATION:
  13. nm = CTABUSNotifictaionManager()