server.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:needybot-speech 作者: needybot 项目源码 文件源码
def clean_cache(self):
        """
        This method completely cleans the cache directory of this
        ``SpeechActionServer`` instance. Use with care.
        """
        rospy.loginfo('Purging speech cache...')
        for f in os.listdir(self._cache_dir):
            if f == '.gitkeep':
                continue
            try:
                p = os.path.join(self._cache_dir, f)
                if os.path.isfile(p):
                    os.unlink(p)
            except Exception as e:
                rospy.logerr(e)
        rospy.loginfo('Speech cache has been purged.')
        self.cleaned_pub.publish()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号