Browse Source

Guaranteed to run cleanup functions in error conditions

atexit
Raphael Roberts 6 years ago
parent
commit
f6a9048a56
  1. 2
      ctabus/internal/notification.py

2
ctabus/internal/notification.py

@ -1,4 +1,5 @@
from concurrent.futures import ThreadPoolExecutor
import atexit
import os
import shlex
import shutil
@ -30,6 +31,7 @@ class NotificationManager:
self._posting = False
self._poster = None
self._live = True
atexit.register(self._cleanup)
def on_done(self):
pass

Loading…
Cancel
Save