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): self._logger = get_logger('notifications') self._manager = NotifiersMng( paths=[join(get_toplevel_dir(), 'zizi', 'apps')], logger=self._logger ) self._manager.add_addon('null', NullNotifier) self._manager.add_addon('none', NullNotifier) self._manager.add_addon('basic', BasicNotifier) self._notifiers = dict()
def __init__(self, logger=get_logger('torrentspider'), fetcher=Fetcher(), cachebag=CacheBag( delta=60 * 60, basedir=join(get_cache_path('torrentspider', 'bag'))) ): self._logger = logger self._fetcher = fetcher self._cachebag = cachebag
def __init__(self): bottle.debug(True) bottle.TEMPLATE_PATH = join(dirname(abspath(__file__)), 'views'), bottle.route('/')(self.index) bottle.route('/static/<filename>')(self.send_static) bottle.route('/search', method='get')(self.search) bottle.route('/queue', method='post')(self.queue) self._logger = get_logger('tita') self._sess = create_session(dbpath=dbpath) self._bypass = BypassApp()
def __init__(self, *args, **kwargs): self._logger = get_logger('NotifiersMng') super(NotifiersMng, self).__init__(*args, **kwargs)
def __init__(self, paths=[], logger=get_logger('PkgMng')): if not all(map(isabs, paths)): raise Exception("All paths must be absolute paths") self._paths = paths self._addons = None
def __init__(self, logger = get_logger('torrentfeedgenerator')): self._logger = logger
def __init__(self, logger=get_logger('spanishtracker'), **options): self._logger = logger self._options = { 'magnet_pattern': r"magnet:?xt=urn:btih:{0[hash_string]}&dn={0[name]}&tr=http%3A%2F%2Fwww.spanishtracker.com%3A2710%2Fannounce&tr=http%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&tr=http%3A%2F%2Ftracker.publicbt.com%3A80%2Fannounce&tr=http%3A%2F%2Ftpb.tracker.prq.to%3A80%2Fannounce&tr=http%3A%2F%2Ftracker.prq.to%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.ccc.de%3A80&tr=udp%3A%2F%2Ftracker.istole.it%3A6969", } self._options.update(options)
def __init__(self, logger=get_logger('classifier')): self._logger = logger self._pluginmng = PluginManager() self._dry_run = False