obographs.py 文件源码

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

项目:scheduled-bots 作者: SuLab 项目源码 文件源码
def create_depend(self, login=None, write=True):
        if self.deprecated:
            return None
        if not self.wd_item_id:
            print("must create item first: {}".format(node.id_purl))
            return None
        try:
            s = self.create_main_statements()
            wd_item = wdi_core.WDItemEngine(wd_item_id=self.wd_item_id, data=s, domain=self.domain,
                                            append_value=[PROPS['subclass of'], PROPS['instance of']],
                                            fast_run=self.fast_run,
                                            fast_run_base_filter={self.primary_ext_prop_qid: ''})
            wdi_helpers.try_write(wd_item, record_id=self.id_colon, record_prop=self.primary_ext_prop_qid, login=login,
                                  write=write)
            return wd_item
        except Exception as e:
            exc_info = sys.exc_info()
            traceback.print_exception(*exc_info)
            msg = wdi_helpers.format_msg(self.id_colon, self.primary_ext_prop_qid, None, str(e), msg_type=type(e))
            wdi_core.WDItemEngine.log("ERROR", msg)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号