mirror of
https://github.com/LC044/WeChatMsg
synced 2025-04-09 14:38:04 +08:00
处理HardLinkVideoAttribute表不存在的异常
This commit is contained in:
parent
5b73d0bf5e
commit
a2ca34a5fa
@ -169,6 +169,8 @@ class HardLink:
|
|||||||
video_db_lock.acquire(True)
|
video_db_lock.acquire(True)
|
||||||
try:
|
try:
|
||||||
self.video_cursor.execute(sql, [md5])
|
self.video_cursor.execute(sql, [md5])
|
||||||
|
except sqlite3.OperationalError:
|
||||||
|
return None
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
self.init_database()
|
self.init_database()
|
||||||
self.video_cursor.execute(sql, [md5])
|
self.video_cursor.execute(sql, [md5])
|
||||||
@ -218,6 +220,8 @@ class HardLink:
|
|||||||
# dir0 = 'Thumb' if thumb else 'Image'
|
# dir0 = 'Thumb' if thumb else 'Image'
|
||||||
dat_image = os.path.join(video_root_path, dir2, data_image)
|
dat_image = os.path.join(video_root_path, dir2, data_image)
|
||||||
return dat_image
|
return dat_image
|
||||||
|
else:
|
||||||
|
return ''
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
if self.open_flag:
|
if self.open_flag:
|
||||||
|
Loading…
Reference in New Issue
Block a user