seen.py 文件源码

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

项目:Taigabot 作者: FrozenPigs 项目源码 文件源码
def db_init(db, bot):
    "check to see that our db has the the seen table and return a connection."
    try:
        db.execute("create table if not exists seen(name, time, quote, chan, host, primary key(name, chan))")
    except:
        for botcon in bot.conns:
            bot.conns[botcon].cmd("QUIT", ["Restarted"])
        time.sleep(5)
        #os.execl("./bot", "bot", "restart")
        args = sys.argv[:]
        args.insert(0, sys.executable)
        os.execv(sys.executable, args)
    db.commit()
    db_ready = True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号