def __init__(self, rt):
ManagerPlugin.__init__(self, rt)
self.git_repo = GitRepo(directory=self.rt.paths.skills,
url='https://github.com/MatthewScholefield/mycroft-light.git',
branch='skills',
update_freq=1)
self.blacklist = self.config['blacklist']
sys.path.append(self.rt.paths.skills)
GroupPlugin.__init__(self, SkillPlugin, 'mycroft.skills', '_skill')
for cls in self._classes.values():
cls.rt = rt
self.init_plugins()
# The watch manager stores the watches and provides operations on watches
wm = pyinotify.WatchManager()
mask = pyinotify.IN_MODIFY | pyinotify.IN_CREATE | pyinotify.IN_DELETE | pyinotify.IN_MOVED_TO
skills_dir = self.rt.paths.skills
handler = EventHandler(self)
notifier = pyinotify.ThreadedNotifier(wm, handler)
notifier.daemon = True
wdd = wm.add_watch(skills_dir, mask, rec=True)
notifier.start()
skills_manager.py 文件源码
python
阅读 22
收藏 0
点赞 0
评论 0
评论列表
文章目录