Skip to content

Commit

Permalink
fix:not close sqlite connection
Browse files Browse the repository at this point in the history
  • Loading branch information
waizui committed Jul 7, 2021
1 parent d06260f commit c051974
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions weibo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit c051974

Please sign in to comment.