database.py 文件源码

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

项目:Malicious_Domain_Whois 作者: h-j-13 项目源码 文件源码
def db_connect(self):
        """?????"""
        if self.db_lock.acquire():
            try:
                self.conn = MySQLdb.Connection(
                    host=self.host,
                    port=self.port,
                    user=self.user,
                    passwd=self.passwd,
                    charset=self.charset)
            except MySQLdb.Error, e:
                print ('connect error:' + str(e))
            self.cursor = self.conn.cursor()
            if not self.cursor:
                raise (NameError, "Connect failure")
            print ("???????")
            self.db_lock.release()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号