|
|
|
@ -1,9 +1,18 @@ |
|
|
|
from ctabus.internal.config import state_dir |
|
|
|
from ctabus.internal.notification import NotificationManager, HAS_NOTIFICATION |
|
|
|
|
|
|
|
|
|
|
|
class CTABUSNotifictaionManager(NotificationManager): |
|
|
|
def __init__(self, workdir=state_dir): |
|
|
|
super().__init__(workdir) |
|
|
|
self.exiter = None |
|
|
|
|
|
|
|
def setup_exiter(self, exiter): |
|
|
|
if self.exiter is None: |
|
|
|
self.exiter = exiter |
|
|
|
|
|
|
|
def on_done(self): |
|
|
|
EXIT.set() |
|
|
|
self.exiter.set() |
|
|
|
|
|
|
|
|
|
|
|
if HAS_NOTIFICATION: |
|
|
|
|