notify.py 文件源码

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

项目:core-framework 作者: RedhawkSDR 项目源码 文件源码
def __call__(self, *args, **kwargs):
        if self.nc_match:
            # Prevent malformed match functions from derailing the entire
            # notification process
            try:
                match = self.nc_match(*args, **kwargs)
            except:
                print >>sys.stderr, 'Exception in match function for notification %s:' % (repr(self.nc_func),)
                traceback.print_exception(*sys.exc_info())

                # Treat an exception in the function as a negative response
                match = False

            if not match:
                return None
        return self.nc_func(*args, **kwargs)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号