diff --git a/weibo.py b/weibo.py index 5cae4980..848bb206 100755 --- a/weibo.py +++ b/weibo.py @@ -418,12 +418,11 @@ def sqlite_exist_file(self, url): cur = con.cursor() query_sql = """SELECT url FROM bins WHERE path=? """ - count = cur.execute(query_sql, (url, )).fetchone() + con.close() if count is None: return False - con.close() return True def insert_file_sqlite(self, file_path, weibo_id, url, binary):