diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-04 05:05:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-04 05:05:21 +0000 |
commit | 56c3f94ba30d76bf680db9bc765624b9a143d769 (patch) | |
tree | 6924fc635fe13fe59911a285313308be2d9acdc7 /modules/sysinfo.py | |
parent | 952effa8b10dba2f2f7f2cf4191f987e3666e9f0 (diff) | |
parent | 073c0ebba380acbd73be8262feba41212165ff84 (diff) | |
download | stable-diffusion-webui-gfx803-56c3f94ba30d76bf680db9bc765624b9a143d769.tar.gz stable-diffusion-webui-gfx803-56c3f94ba30d76bf680db9bc765624b9a143d769.tar.bz2 stable-diffusion-webui-gfx803-56c3f94ba30d76bf680db9bc765624b9a143d769.zip |
Merge branch 'dev' into dev
Diffstat (limited to 'modules/sysinfo.py')
-rw-r--r-- | modules/sysinfo.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/sysinfo.py b/modules/sysinfo.py index 5f15ac4f..cf24c6dd 100644 --- a/modules/sysinfo.py +++ b/modules/sysinfo.py @@ -109,11 +109,15 @@ def format_traceback(tb): return [[f"{x.filename}, line {x.lineno}, {x.name}", x.line] for x in traceback.extract_tb(tb)]
+def format_exception(e, tb):
+ return {"exception": str(e), "traceback": format_traceback(tb)}
+
+
def get_exceptions():
try:
from modules import errors
- return [{"exception": str(e), "traceback": format_traceback(tb)} for e, tb in reversed(errors.exception_records)]
+ return list(reversed(errors.exception_records))
except Exception as e:
return str(e)
|