修复空文件生成的BUG

This commit is contained in:
pengtao 2019-08-13 14:53:02 +08:00
parent be1b3b17e8
commit 2d37c4a477

View File

@ -36,11 +36,10 @@ class TGA_event(GetFromTga):
temp = {}
try:
temp['id'], temp['num'] = line
if temp:
log.info(f"will write {temp} 2 tga!")
self.write_tga_files(temp)
except Exception:
log.error(f"write {line} 2 tga failed!", exc_info=True)
if temp:
self.write_tga_files(temp)
def event_shop_new(self):
sql = f"""select
@ -67,7 +66,6 @@ class TGA_event(GetFromTga):
try:
temp['id'], temp['num'] = line
if temp:
log.info(f"will write {temp} 2 tga!")
self.write_tga_files(temp)
except Exception:
log.error(f"write {line} 2 tga failed!", exc_info=True)