manager.py 文件源码

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

项目:PyPlanet 作者: PyPlanet 项目源码 文件源码
def finish_reservations(self):  # pragma: no cover
        """
        The method will copy all reservations to the actual signals. (PRIVATE)
        """
        for sig_name, recs in self.reserved.items():
            for func, kwargs in recs:
                try:
                    signal = self.get_signal(sig_name)
                    signal.connect(func, **kwargs)
                except Exception as e:
                    logging.warning('Signal not found: {}, {}'.format(
                        sig_name, e
                    ), exc_info=sys.exc_info())

        for sig_name, recs in self.reserved_self.items():
            for func, slf in recs:
                try:
                    signal = self.get_signal(sig_name)
                    signal.set_self(func, slf)
                except Exception as e:
                    logging.warning(str(e), exc_info=sys.exc_info())

        self.reserved = dict()
        self.reserved_self = dict()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号