def _load_plugin_info_from_item(pkgdir): ''' Tries really hard to load the plugin info from the specified item. ''' try: return importers.yaml_import('info', loadpath=[pkgdir]) except ImportError: try: return importers.yaml_load(pkgdir / 'info.yaml') except Exception: return None
def _load_plugin_info_from_item(pkgdir): ''' Tries really hard to load the plugin info from the specified item. ''' try: return importers.yaml_import('info', loadpath = [pkgdir]) except ImportError: try: return importers.yaml_load(pkgdir / 'info.yaml') except Exception: return None
def _actions(): global _actions_cached global _actions_imported if _actions_imported: return _actions_cached from gui import skin try: actions = importer.yaml_import('actions', loadpath = [skin.resourcedir()]) except ImportError: actions = {} finally: _actions_imported = True add_actions(actions) return _actions_cached
def get_notification_info(_cache = []): try: nots = _cache[0] except IndexError: pass from gui import skin mod = importer.yaml_import('notificationview', loadpath = [skin.resourcedir()]) nots = _process_notifications_list(mod.__content__) _cache.append(nots) # allow plugins to add their own notification topics here. import hooks hooks.notify('digsby.notifications.get_topics', nots) return nots
def _actions(): global _actions_cached global _actions_imported if _actions_imported: return _actions_cached from gui import skin try: actions = importer.yaml_import('actions', loadpath=[skin.resourcedir()]) except ImportError: actions = {} finally: _actions_imported = True add_actions(actions) return _actions_cached
def get_notification_info(_cache=[]): try: nots = _cache[0] except IndexError: pass from gui import skin mod = importer.yaml_import('notificationview', loadpath=[skin.resourcedir()]) nots = _process_notifications_list(mod.__content__) _cache.append(nots) # allow plugins to add their own notification topics here. import hooks hooks.notify('digsby.notifications.get_topics', nots) return nots
def yaml_load(self, yamlname): try: return importers.yaml_import(yamlname, loadpath=[self.path]) except ImportError: return None
def yaml_load(self, yamlname): try: return importers.yaml_import(yamlname, loadpath = [self.path]) except ImportError: return None