mirror of
https://github.com/Emersont1/itchio.git
synced 2026-03-11 08:54:39 +00:00
Exception stacks in download_library are printed to errors.txt, for issue #57
This commit is contained in:
parent
0dded2ab02
commit
6e9029815a
1 changed files with 6 additions and 3 deletions
|
|
@ -3,6 +3,7 @@ from concurrent.futures import ThreadPoolExecutor
|
|||
import functools
|
||||
import threading
|
||||
import requests
|
||||
import traceback
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
from itchiodl.game import Game
|
||||
|
|
@ -89,9 +90,11 @@ class Library:
|
|||
with lock:
|
||||
with open("errors.txt", "a") as f:
|
||||
f.write(
|
||||
f""" Cannot download game/asset: {g.name}
|
||||
This game/asset has been skipped please download manually
|
||||
---------------------------------------------------------\n """
|
||||
f""" An error occurred while downloading: {g.name}\n """
|
||||
)
|
||||
traceback.print_exc(file=f)
|
||||
f.write(
|
||||
f""" -----------------------------------------------\n """
|
||||
)
|
||||
finally:
|
||||
with lock:
|
||||
|
|
|
|||
Loading…
Reference in a new issue