1
0
mirror of https://github.com/Escartem/AnimeWwise.git synced 2026-06-04 23:40:25 +08:00

better error handling

This commit is contained in:
Escartem
2023-10-20 14:52:28 +02:00
parent 5d23b26d81
commit 958598334a

View File

@@ -1,4 +1,5 @@
import os
import sys
import shutil
import zipfile
import filecmp
@@ -7,7 +8,7 @@ import subprocess
from halo import Halo
from progress.bar import PixelBar
# don't question how optimised this is
cwd = os.getcwd()
path = lambda path: os.path.join(cwd, path)
call = lambda args: subprocess.call(args, stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT)
@@ -259,7 +260,7 @@ def main():
print(f"[{curr}/{steps}] Cleaning up")
except Exception as e:
print("An error occured while processing this file ! Skipping to the next one, details of the error bellow :")
print(e)
print(f"Line {sys.exc_info()[-1].tb_lineno}, {e}")
# all files processed
if os.path.exists("temp"):