class Notifier(NotifierBase): def __init__(self, *args, **kwargs): self._app = App() @withconfig def notify(self, profile = None, msg = None, detail = None, sender = None, settings = None): if not profile: profile = settings.get('defaults', 'profile', fallback = None) try: self._app.run(profile, status = msg) except Exception as e: get_logger().warning('Cannot notify: %s' % e)
def __init__(self, *args, **kwargs): self._app = App()